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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ChangeFileOpenDirectory should point to a folder in the user profile

Status
Not open for further replies.

AlexFeddes

Programmer
Jan 17, 2009
22
NL
Instead of pointing to a fixed folder in for example Program Files, I want to open a file in the My Documents folder from the user that is logged in.

ChangeFileOpenDirectory "C:\Program Files\1-ACF Studytools\Handleiding\"
Documents.Open FileName:="ACF Studies introductie.doc"

I would like the first line ChangeFileOpenDirectory to point to My Documents\1-ACF Studytools\Handleiding\ in the user profile that is logged in. For example if I am logged in, it should point to C:\Users\Alex\Documents\1-ACF Studytools - but when my wife is logge din, it should point to C:\Users\My wife\Documents\1-ACF Studytools zijn.

It has to be a flexible reference to Documents within the documents of the user logged in {userdocs}.

Please advise,
Alex
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top