Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MailMerge

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi,

Is it possibe to disable a MailMerge without open the document which contains this MailMerge??

Lord_fou
 
Use the Word object model. You have to "open" the file in terms of load it into memory, but you do not have to display it on the screen.
Simon
 
This is the code I use as you say in your reply but it don't work:

Sub MacroFRED()
Dim DOC As Document

Application.WordBasic.disableautomacros
Application.DisplayAlerts = wdAlertsNone
Set DOC = Application.Documents.Open (c:\\TEST.doc",Visible=False)
DOC.MailMerge.MainDocumentType = wdNotAMergeDocument
CommandBars("Control Toolbox").Visible = False
End Sub

The opening of the document try ever to do the Mailmerge

Thanks in advance

LORD_FOU
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top