>Are there some things in Word that cannot be controlled from VFP? Tamar was kind enough to suggest that I get a copy of her Office Automation book (after just an hour after getting the book delivered, I was able to finally get almost all of my Word VBA code converted to VFP!).
>
>I'm still stuck on one that I absolutely cannot get to work.
>
>After Word is launched an existing Word document is opened that is all set to mailmerge, all I need to do is change the name of the Data Source table (the table structure never changes, field names stay the same and always has just one record). The OpenDataSource.name parameter is passed a memory variable of m.ltrfile. Is this possible?
>
>
> ActiveDocument.MailMerge.OpenDataSource Name:="F:\_comps\31527956.dbf", _
> ConfirmConversions:=False, ReadOnly:=False, LinkToSource:=True, _
> AddToRecentFiles:=False, PasswordDocument:="", PasswordTemplate:="", _
> WritePasswordDocument:="", WritePasswordTemplate:="", Revert:=False, _
> Format:=wdOpenFormatAuto, Connection:= _
> "DSN=FoxPro Files - Word;UID=;PWD=;SourceDB=F:\_comps;SourceType=DBF;Exclusive=No;BackgroundFetch=No;Collate=MACHINE;Null=Yes;Deleted=Yes;" _
> , SQLStatement:="SELECT * FROM 31527956.dbf", SQLStatement1:=""
Dick,
You might want to check Message #
667850, Message #
635450, Message #
634851, Message #
695329 and also MailMerge class in downloads (but beware those class is old - before MDAC2.1 changed things).
Cetin