Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Word Mail Merge from within VFP
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Word Mail Merge from within VFP
Divers
Thread ID:
00395090
Message ID:
00395090
Vues:
45
My app is written in VFP 6.0. Currently in my app there is a screen where the client picks a letter to generate. The app creates a .dbf then starts Word. The client then must click on the appropriate preloaded macro (macro must match the selected letter) from within Word to merge the data. There must be an easier way.

1) want a more automated way to run the macro from within VFP. so when the client first sees Word the fields have been merged with the form. have not done office automatic before. would really be ideal if the clients did no have to have the macros even preloaded on their machines. it is a drag loading the macros. the only difference among the macros is the file name. Could I accomplish all this from within VFP?

ChangeFileOpenDirectory "\\FL037F06\VOL1\APPS\RT50\templates\"
Documents.Open FileName:="L_AFDAVIFRM.doc", ConfirmConversions:=False, _
ReadOnly:=False, AddToRecentFiles:=False, PasswordDocument:="", _
PasswordTemplate:="", Revert:=False, WritePasswordDocument:="", _
WritePasswordTemplate:="", Format:=wdOpenFormatAuto
With ActiveDocument.MailMerge
.Destination = wdSendToNewDocument
.MailAsAttachment = False
.MailAddressFieldName = ""
.MailSubject = ""
.SuppressBlankLines = True
With .DataSource
.FirstRecord = wdDefaultFirstRecord
.LastRecord = wdDefaultLastRecord
End With
.Execute Pause:=True
End With
End Sub

2) about 6 months ago, my Word quite recognizing .dbf files of any kind: no VFP, no FoxPro, no dBase. thank goodness this has not happened at any of the client sites. but i have no idea what i loaded (visual studio, updates, etc) that wiped out the ODBC from Word to .dbf. Any ideas how I can correct this problem?

Thanks

Brenda
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform