Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 04-28-2022, 07:11 AM
macropod's Avatar
macropod macropod is offline Problem merging to separate docs Windows 10 Problem merging to separate docs Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,383
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by speckledegg View Post
Yes; I tried running it with and without the renaming. If I run it from Word with the renaming, then nothing happens after you select "Edit Individual Documents" - it just appears to do nothing.
That is to be expected.
Quote:
Originally Posted by speckledegg View Post
If I keep the original name (as per your original code) and run the macro on the mailmerged document, I get the runtime error.
One apparent error in your code concerns:
Code:
        'StrFolder = .DataFields("Folder") & "\"
        StrName = .DataFields("Folder_Name") & "_" & .DataFields("Last_Name")
which should be:
Code:
        StrFolder = .DataFields(Folder_Name") & "\"
        StrName = .DataFields("Last_Name")
To see why, look at the .SaveAs line...

Apart from that, there is no obvious reason why the runtime error would have anything to do with:
Code:
.Destination = wdSendToNewDocument
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem merging to separate docs Merge into Separate Docs chrnon Mail Merge 1 04-27-2022 03:08 PM
Merging of colums from two different docs & create a new doc ranjan Word VBA 9 08-31-2021 08:25 AM
Problem merging to separate docs Extra blank page at end of each document when merging to separate documents. Blondyvl Mail Merge 1 12-03-2020 04:33 PM
Problem merging to separate docs Merging Various .docs Via Q&A Wants_It_Simple Word 1 06-30-2014 10:26 PM
Problem merging to separate docs Adding identical footers to 187 separate docs sqzdog Word 11 10-31-2011 01:46 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:48 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