Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Automating word from VFP
Message
De
19/09/2000 18:30:58
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00418296
Message ID:
00418302
Vues:
27
The following is a quick way to merge a document from VFP:


public goWordApp
goWordApp = createobject("Word.Application")
goWordApp.documents.open("Your Merge Doc")
gowordapp.activedocument.mailmerge.destination = wdSendToPrinter
goWordApp.ActiveDocument.MailMerge.Execute
goWordApp.documents.close(wdDoNotSaveChanges)
goWordApp.quit()
release goWordApp


You can get more info on the commands if you have installed the Visual Basic for Applications help that is accessible from the Word help menu.


*-- Visual Basic global variables to be placed in a header file that
*is included with your project

#DEFINE wdPrintAllDocument 0
#DEFINE wdPrintDocumentContent 0
#DEFINE wdPrintAllPages 0
#DEFINE wdSaveChanges -1
#DEFINE wdDoNotSaveChanges 0
#DEFINE wdEnglishUS 1033
#DEFINE wdFormatText 2
#DEFINE wdCollapseEnd 0
#DEFINE wdPageBreak 7
#DEFINE wdStory 6
#DEFINE wdCharacter 1
#DEFINE wdWindowStateMaximize 1
#DEFINE wdFieldEmpty -1
#DEFINE wdSectionBreakNextPage 2
#DEFINE wdSendToPrinter 1
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform