N
Nirmal Singh
I am running a macro to do a mail merge from an excel spreadsheet.
The code for the mail merge is as follows:
ActiveDocument.MailMerge.OpenDataSource Name:= _
excelsheet, ConfirmConversions:=False, ReadOnly:= _
False, LinkToSource:=True, AddToRecentFiles:=False, _
Revert:=False, Format:=wdOpenFormatAuto, Connection:= _
"Sheet1", SQLStatement:="", SQLStatement1:=""
This pops up a dialog box to select the table for the merge. I want to use
the data in Sheet1.
How can I get rid of this dialog within my code?
Nirmal Singh
The code for the mail merge is as follows:
ActiveDocument.MailMerge.OpenDataSource Name:= _
excelsheet, ConfirmConversions:=False, ReadOnly:= _
False, LinkToSource:=True, AddToRecentFiles:=False, _
Revert:=False, Format:=wdOpenFormatAuto, Connection:= _
"Sheet1", SQLStatement:="", SQLStatement1:=""
This pops up a dialog box to select the table for the merge. I want to use
the data in Sheet1.
How can I get rid of this dialog within my code?
Nirmal Singh