Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Word Mail Merge Question
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Word Mail Merge Question
Divers
Thread ID:
00399481
Message ID:
00399481
Vues:
43
Someone posted the following code to perform a Word Mail Merge from within VFP. If works well except for a couple of things

1) How do I specify the default printer in Word? The MailMerge.Execute makes Word wait for the OK button on the Printer window.
2) Can I make gowordapp.visible = .t. without switching to Word? I am thinking that I have a large and diverse group of users, who have their own mail merge documents. If there is a messagebox in Word and Word is not visible, they are stuck and must force complete my app. With Word visible they could switch over there an get rid of the message box. but i do not want my app to swap over to word.
3) what is the value for wdDoNotSaveChanges?

public goWordApp
goWordApp = createobject("Word.Application")
goWordApp.documents.open(settlement.doc)
gowordapp.activedocument.mailmerge.destination = 1 && to printer
goWordApp.ActiveDocument.MailMerge.Execute
goWordApp.documents.close(wdDoNotSaveChanges)
goWordApp.quit()
release goWordApp

thanks

brenda
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform