Hi all,
Anyone got a line of code to remove the mailmerge datasource, thus restoring the active mailmerge document to a normal word doc.?
MD
Hi all,
Anyone got a line of code to remove the mailmerge datasource, thus restoring the active mailmerge document to a normal word doc.?
MD
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
Hi Malcolm,
I thought that it was something like ...
... but it's been a while since I coded my mailmerge stuff. I'll dig around and see if I can confirm that.MailMergeDataSource.Close
Last edited by Aussiebear; 04-16-2023 at 10:25 PM. Reason: Adjusted the code tags
Ken Puls, CMA - Microsoft MVP (Excel)
I hate it when my computer does what I tell it to, and not what I want it to.
Learn how to use our KB tags! -||- Ken's Excel Website -||- Ken's Excel Forums -||- My Blog -||- Excel Training Calendar
This is a shameless plug for my new book "RibbonX - Customizing the Office 2007 Ribbon". Find out more about it here!
Help keep VBAX clean! Use the 'Thread Tools' menu to mark your own threads solved!
hope this helps:
' clear mail merge association on this doc ActiveDocument.MailMerge.MainDocumentType = wdNotAMergeDocument
Last edited by Aussiebear; 04-16-2023 at 10:26 PM. Reason: Adjusted the code tags
Thanks Jeeves.
I tried recording a macro in 2000 but with no result. I just found that one in 2003, so I hope it's retrospective.
MD
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
Hi Malcolm,Originally Posted by mdmackillop
Just checked Word 97, and it is supported there.
Cheers,
Ken Puls, CMA - Microsoft MVP (Excel)
I hate it when my computer does what I tell it to, and not what I want it to.
Learn how to use our KB tags! -||- Ken's Excel Website -||- Ken's Excel Forums -||- My Blog -||- Excel Training Calendar
This is a shameless plug for my new book "RibbonX - Customizing the Office 2007 Ribbon". Find out more about it here!
Help keep VBAX clean! Use the 'Thread Tools' menu to mark your own threads solved!
Thanks Ken.
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'