Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP-Word2K - Create DocVariable in a template file
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00761396
Message ID:
00762112
Vues:
57
What do you mean, "I was not able to create and place variables from Word"?
You can gather variables defined in the document and pass them to your program:

dime aVariablesfromWord[.ActiveDocument.Variables.Count,2]

for ia=1 to .ActiveDocument.Variables.Count
aVariablesfromWord[ia,1]=.ActiveDocument.Variables(ia).Name
aVariablesfromWord[ia,2]=.ActiveDocument.Variables(ia).VAlue
endfor


>Yes thanks Yuri I can create variables programatically but I want the users to be able to place the variables (I can create the basic DOT file with variables before hand if required) but I was not able to create and place variables from Word.
>
>>Something like this:
>>
>>* add variables
>> .ActiveDocument.Variables("Client.ICID").Value=23
>> ?.ActiveDocument.Variables.Count
>> ?.ActiveDocument.Variables(1).Name
>> ?.ActiveDocument.Variables(1).Value
>>>Hi
>>>
>>>I have to create a Word Doc Template. This template is supposed to allow the user to put in predefined fieldnames, names that the VFP automation program expects from this template.
>>>
>>>Q1. How and Where to define DocVariables in a template file?
>>>Q2. How to put these DocVariables (not it's value) in the template file?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform