Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Word Mail Merge
Message
From
21/04/2012 14:43:15
 
 
To
21/04/2012 14:22:44
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Environment versions
Visual FoxPro:
VFP 7
OS:
Windows 7
Miscellaneous
Thread ID:
01542272
Message ID:
01542296
Views:
50
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:\mydata\gmr\gmr\lunches\data\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
Reply
Map
View

Click here to load this message in the networking platform