Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Change VBA code to VFP code
Message
 
À
21/09/2000 13:35:07
Liam O'Hagan
O'Hagan Programming Ltd
Irlande
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00419145
Message ID:
00419355
Vues:
21
Liam,

I just did a search in files section and could not find any merge.zip.

I'd appreciate it if you could email it to me at : gerard@linkt.ie
Regards,
Gerard




>Hi Gerard,
>
>I've just sent a file to the files section which should do what you want. It's a classed solution for programmatically performing MS Word Form Letters against a DBF. Just tell it where the form letter and DBF files are, include an SQL SELECT if you want to filter the merge and away it goes. It's pretty basic but it works fine for me. At present it will only merge to a new document.
>
>I'll probably be tightening it up and adding more options so if you have any requests send them on to me and I'll see about getting them in.
>
>The file is called MERGE.ZIP in the CLASSES section. I only sent it a few minutes ago so I don't know when it will be available for download. If you're in a hurry and it's not up for download soon, send me a mail and I'll email it to you.
>
>Regards,
>
>Liam
>
>
>
>
>>Hi.
>>I/m trying to use OLE automation to get VFP to run a Word Mailmerge . I have turned macro on, and got the commands to run my Mailmerge, but it is in VBA code. An example :
>>
>> ActiveDocument.MailMerge.OpenDataSource Name:="C:\KER\kfsma.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=C:\KER;SourceType=DBF;Exclusive=No;BackgroundFetch=Yes;Collate=MACHINE;Null=Yes;Deleted=Yes;" _
>> , SQLStatement:="SELECT * FROM kfsma.dbf", SQLStatement1:=""
>>
>>
>>Now I've replaced the _ with a ; and also bracketed all the parameters, but am getting an OLE Error Code - Type Mismatch)
>>
>>I have checked the VBA help file and put in the parametes above in the sequence they are specified. I have also tried .T. for any a parameter where :=TRUE.
>>
>>Any help appreciated
>>
>>regards,
>>
>>Gerard
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform