Quote:
Originally Posted by JennEx
I noticed in your code you removed '.MainDocumentType = wdNotAMergeDocument'. I assume it's unnecessary in this application?
|
Since the code closes your mailmerge main document without saving the changes the code makes to it, that line is unnecessary.
The '.DisplayAlerts = False' line suppresses the mailmerge SQL prompt. Be aware this also causes the document to revert to an ordinary one - which is also why you then need the code you already had for setting the document type, opening the data source, etc. And, of course, one should restore with '.DisplayAlerts = True' before exiting, otherwise important prompts might not be given post-merge.
Quote:
Originally Posted by JennEx
I have just stumbled on the fact that my data source has two columns labelled as 'TYPE', which is one of the SQL criteria. Would this contribute to the problem?
|
I may but, even if it doesn't, you might find it pulling data from the wrong one! Better to have unique names for all fields.