View Single Post
 
Old 03-30-2018, 02:51 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

When I opened your Excel workbook and had a look at your code, what I found is that it doesn't have a reference to the Word object library. Without that, you can't use named constants like wdFieldEmpty.

I'd also have to question why you're approaching the project the way you are. It seems to be a very round-about way of creating a document. Since you'd need to know what the data source is in order to populate the mergefields after the mailmerge main document has been created, why not simply populate the document with the corresponding data instead of relying on a mailmerge to do so?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote