atw: Re: DocVariables in Word [SEC=UNCLASSIFIED]

Hi Elizabeth
 
Yes, as far as I remember, the only way to get to doc variables is
through VBA. To change the value you use a statement like
 
ActiveDocument.Variables("DocVar Name").Value = "some string"
 
Since you mention DocVariable fields, you presumably have the names of
the variables, so you should be able to do this.
 
Howard

        -----Original Message-----
        From: austechwriter-bounce@xxxxxxxxxxxxx
[mailto:austechwriter-bounce@xxxxxxxxxxxxx] On Behalf Of Elizabeth
Fullerton
        Sent: Wednesday, 22 March 2006 14:13
        To: austechwriter@xxxxxxxxxxxxx
        Subject: atw: DocVariables in Word
        
        

        Hi all 

        Here's one that has me stumped (my rep as Word guru on the verge
of tatters). 

        We have a document which uses DocVariable fields. We don't know
how to change the value of them, and we want to. 

        The research I have done indicates that it is done via VB (not
the beer) (that may make my lack of knowledge easier to bear, though I
usually prefer champagne on such occasions... but i digress) - we don't
know where the variables are stored.

        Is it perhaps that they are stored in the document invisibly,
and we can only change them by running a macro? There is no evidence of
such a macro being attached to the document in question.

        Hopefully someone can help me, otherwise I am in for an
afternoon of playing! 


        Regards 

        Elizabeth Fullerton 
        Business Solutions Architect 
        Infosys Australia 
        Tel: +61 3 9911 3355 
        Fax: +61 3 9911 3407 
        www.infosys.com <http://www.infosys.com>  
        Powered by Intellect 
                         Driven by values 


**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended
solely for the use of the addressee(s). If you are not the intended
recipient, please notify the sender by e-mail and delete the original
message. Further, you are not to copy, disclose, or distribute this
e-mail or its contents to any other person and any such actions are
unlawful. This e-mail may contain viruses. Infosys has taken every
reasonable precaution to minimize this risk, but is not liable for any
damage you may sustain as a result of any virus in this e-mail. You
should carry out your own virus checks before opening the e-mail or
attachment. Infosys reserves the right to monitor and review the content
of all messages sent to or from this e-mail address. Messages sent to or
from this e-mail address may be stored on the Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***
        

Other related posts: