Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Merge Question ABC Button..
Message
De
19/04/2008 17:46:54
Chris Sund
Silhouette Solutions
Utah, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Divers
Thread ID:
01311708
Message ID:
01311904
Vues:
20
Hi Borislav,

Here's the chunk of code that actually does the merge...
oWord = Createobject("Word.Application")
		oWord.Visible = .T.



		oDoc = oWord.Documents.Open(Curdir()+"form_letters\"+pdocument)
		oDoc.MailMerge.MainDocumentType = 0
		oDoc.MailMerge.OpenDataSource(lcSourceDoc)

*!*			oDoc.MailMerge.Datasource.FirstRecord =  oDoc.MailMerge.Datasource.ActiveRecord
*!*			oDoc.MailMerge.Datasource.LastRecord = oDoc.MailMerge.Datasource.ActiveRecord


		oDoc.Activate && Make it the active foreground app
		oWord.ActiveDocument.ActiveWindow.View.ShowFieldCodes = .F.
I hope that helps.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform