Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word 2002: Environment Variable Field in Doc

Status
Not open for further replies.

GGleason

Technical User
Mar 22, 2001
321
US
Is there a way to set a field to display the contents of an environment variable in Word?

tia,
GGleason
 
Insert> Field has lots choices 4 document environment variables. u want OS environment variables - like PATH etc.? if so u can pick them up with ENVIRON("variableName") through VBA.
 
I am familiar with VBA in Access and Excel, but not so much in Word. So I have no clue how to do this.

I have a sentence in Word that needs to have the path that is related to the users' login path. I've been able to echo out the environment variable I want within Word's VBA but I don't know how to apply it directly to that sentence.

Any help would be welcome.

Thanks,
GGleason
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top