The How-To Geek Forums Have Migrated to Discourse

How-To Geek Forums / Microsoft Office

Path problem in VBA word 2007

(2 posts)
  • Started 6 years ago by cetest
  • Latest reply from scorpion99
  • Topic Viewed 997 times

Posts: 1

I tried to create a VBA enabled template document (.dotm) that when dpouble clicked upon in a specific directory
reads in all kind of client data from that specific directory. I have a lot of clients, so a fixed path solution wont'help.
Word 2007 VBA refuse to read in text files from the current path.
I tried Curdir and Activedocument.path and none does the job. Curdir is changing in time as
it is related to XP idea of the current directory, and activedocument.path does not do the job,
as the new document created when double clicking the template file has not been saved yet.
Actually what i need is the path of the template file clicked upon.
This is a really annoying problem in Word VBA. Any tips on the solution are very welcome.
Even tips that require some intervention before word starts.
Any fixed location does not work, as i may decide to work on more clients at the same time.
Thanks all of you

Posted 6 years ago
Posts: 1033

did you try to set the path in :
My Computer (right click) ---->properties ------>Advanced ------>Environment variables ???????

Posted 6 years ago

Topic Closed

This topic has been closed to new replies.