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

Problem VBA Word … trying to locate the drive 1

Status
Not open for further replies.

bobmie

Programmer
Oct 22, 2005
16
BE
Problem VBA Word … trying to locate the drive
By double click on a word document on my F or G drive this document opens and I want to know through the VBA programme of the open document the name of the drive and the folder where my document resides
I tried the Curdir statement but this gives me the location of the Word Exe which is on the C drive
Thanks in advance !
 
You can INsert > Field
Choose 'Filename'. Tick the Include path checkbox and click OK.

 
Thanks Lilliabeth and Dcompto for your reply .
Thisdocument.path statement solved the problem ! ! ! as simple as that !
Lilliabeth I did'nt understand your suggestion !
bob
 
That is because I didn't read the question correctly. Apparently I need to go to a remedial reading class.

In Word, (not VBA), you can use the menu to insert the path\filename. (Insert > Field, Yada, Yada.)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top