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:=""
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement