General information
Category:
COM/DCOM and OLE Automation
I posted this earlier...sorry to confuse you. This covers what I captured of what happened in Word...um, what I need to happen in Word.
I recorded the following macro to produce code for what I need to do. I'm opening the data file for a mail merge and receive a couple of prompts along the way I would like to deal with in code. Any help converting the following is greatly appreciated.
ActiveDocument.MailMerge.OpenDataSource Name:= _
"C:\myfiles\labels.xls", ConfirmConversions:=False, _
ReadOnly:=False, LinkToSource:=True, AddToRecentFiles:=False, _
PasswordDocument:="", PasswordTemplate:="", WritePasswordDocument:="", _
WritePasswordTemplate:="", Revert:=False, Format:=wdOpenFormatAuto, _
Connection:= _
"Provider=Microsoft.Jet.OLEDB.4.0;Password="""";User ID=Admin;Data Source=C:\newproject\labels.xls;Mode=Read;Extended Properties=""HDR=YES;IMEX=1;"";Jet OLEDB:System database="""";Jet OLEDB:Registry Path="""";Jet OLEDB:Database Password="""";Jet OLE" _
, SQLStatement:="SELECT * FROM `Sheet1$`", SQLStatement1:="", SubType:= _
wdMergeSubTypeAccess
Thanks,
Martha
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only