Clear mail merge datasource

M

Mike

How do I clear a mail merge datasource without removing the mail merge functionality or the mail merge fields? I only see the option to 'CHANGE' the datasource, but not 'REMOVE' it. Help in doing this manually or programmatically would help.

I will be opening the letter and assigning the mail merge datasource programmatically from an Access database, but I do not want the letter inherently tied to any specific database. It takes longer to open the letter right now because it's opening the datasource it's tied to, and then opening the datasource I set programmatically.

Your help is greatly appreciated.
 
P

Peter Jamieson

In VBA, set

ActiveDocument.MailMerge.MainDocumentType = wdNotAMergeDocument

This disconnects Word from the data source. It leaves all the fields in the
document, but discards any filters and sort sequences.

--
Peter Jamieson - Word MVP
Word MVP web site http://word.mvps.org/

Mike said:
How do I clear a mail merge datasource without removing the mail merge
functionality or the mail merge fields? I only see the option to 'CHANGE'
the datasource, but not 'REMOVE' it. Help in doing this manually or
programmatically would help.
I will be opening the letter and assigning the mail merge datasource
programmatically from an Access database, but I do not want the letter
inherently tied to any specific database. It takes longer to open the
letter right now because it's opening the datasource it's tied to, and then
opening the datasource I set programmatically.
 
P

Preet

Peter

Your VBA code was VERY useful. I have been trying to get rid of th
link to the data source in Mail Merge, for a while now and your cod
SOLVED IT!

Thank you, thank you....

Preet:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top