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.
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/
> 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.
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:
--
Message posted from http://www.ExcelForum.com
Thank you that worked Peter
--
Message posted from http://www.ExcelForum.com