Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Mail Merge fields from an active document
Message
De
11/07/2005 14:02:06
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Mail Merge fields from an active document
Divers
Thread ID:
01031326
Message ID:
01031326
Vues:
58
HI All,

I have been trying to complete a mail merge routine using MS Word 2002. The data source will be a small text file which is created from an ever-changing field list derived from an SQL database. In order to create this text file in the most efficient manner, I need to retrieve the mail merge field names in the document used for the mail merge. This document is one a user will choose and could contain one, three, five or even fifty-five mail merge fields. This statement tells me how many mail merge fields there are in the DOC...


mmcount=document.MailMerge.Fields.Count


But, what do I use to get the name of each field? I am certain there will be a loop and counter involved... I was hoping something like ...


mmFname=document.MailMerge.Fields.item(x).Name ;


Please note that I have already dicovered the syntax to get the field names from the datasource.. this I do not want since the datasource will change dynamically. I need the mail merge field names from the active document regardless of data the source.

Any help would be GREATLY appreciated!

Thanks,
Paul
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform