Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP-Word2K - Create DocVariable in a template file
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00761396
Message ID:
00762681
Views:
62
This message has been marked as a message which has helped to the initial question of the thread.
I doubt you can use variables directly in WORD as we discussed. Try forms or, even better, VBA controls instead (go to View-->Toolbars-->Visual Basic--> choose "control toolbox" to see available controls.

>I am not versed, forget well versed, with Word. I tried going through all available menu options in Word2K, I couldn't find a place to create variables from the Word Document window and then place them on the document as place holder, not as value which I was able to do.
>
>>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?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform