General information
Category:
COM/DCOM and OLE Automation
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only