View Single Post
 
Old 01-31-2018, 04:11 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
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 constructionjasont View Post
TWould there be a reason then that it doesn't work running a macro in Excel? I have the excel vba as shown below, it will open the source document, but won't run the word macro. But if I run said macro directly through word it does fine. I tried finding a solution, but from what I can tell it should work?
For starters, if the Word document you're trying to open is a mailmerge main document, the whole process will stall as soon as the document opens, because Word will be waiting for you to respond to the SQL prompt that you get when opening such a document.

There are ways around that, but the coding becomes a whole lot more complex. See, for example: https://www.msofficeforums.com/mail-...html#post61768. Even that code doesn't generate the individual Word documents - you'd need to integrate the two approaches.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote