Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-06-2021, 01:34 AM
gmayor's Avatar
gmayor gmayor is offline Automate mail merge to save each record individually using VBA Windows 10 Automate mail merge to save each record individually using VBA Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,144
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

If the data sheet was viable (It has an incompatible ROW1 and several empty rows after the sixth record) and you remove the unassociated field from the document then save it as a DOCX format (see attached) the code I posted works without problem. See attached. You'll need to reattach the data file.
Run the code from your normal template.
Attached Files
File Type: zip Example.zip (19.9 KB, 15 views)
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #2  
Old 12-06-2021, 02:29 AM
user4829 user4829 is offline Automate mail merge to save each record individually using VBA Windows 10 Automate mail merge to save each record individually using VBA Office 2019
Novice
Automate mail merge to save each record individually using VBA
 
Join Date: Dec 2021
Posts: 6
user4829 is on a distinguished road
Default

I am still having some trouble. I have had 2 outcomes:

1. When I first connect the data source and run the macro I have to run it 3-4 times and it either exports 1,2 or 3 files (screen recording attached)

2. When I delete those saved files from the folder (Created above) and I run the macro, I can see the preview of the file exporting all of the different data and saving the file on top of itself (screen recording attached), so I only end up with one file.

Any thoughts on why this might be?
Attached Files
File Type: zip 1. multiple macro runs needed.gif.zip (1.89 MB, 11 views)
File Type: zip 2. file saving over itself.gif.zip (860.2 KB, 10 views)
Reply With Quote
Reply

Tags
mail merge, mail merge code, mail merge saving



Similar Threads
Thread Thread Starter Forum Replies Last Post
Automate mail merge to save each record individually using VBA How to mail merge next record on same page to save paper klc9761 Mail Merge 1 04-22-2017 02:29 PM
Automate mail merge to save each record individually using VBA Showing record number during mail merge catflap Mail Merge 1 04-13-2017 07:32 AM
Automate mail merge to save each record individually using VBA Mail Merge Next Record If rule RHensley Mail Merge 10 03-07-2017 08:05 AM
Automate mail merge to save each record individually using VBA Automate daily mail merge JCInfo Mail Merge 4 12-02-2013 05:12 PM
avoid duplicete record and merge the record with the existed record hemant.behere Excel 0 01-10-2012 02:53 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:55 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft