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!

All my colleagues have mapped the s 1

Status
Not open for further replies.

wmbb

Technical User
Jul 17, 2005
320
NL
All my colleagues have mapped the same network drive but assigned to different drive letters.
Is there a way in VBA to detect the drive letter they've chosen to map the network drive called "measure_data"?
I want to use this code in a macro in WORD 2010.
 
Hi,

Counting on convention is not very reliable.

It is best to use the network server and share in your path without reference to the drive

\\server\share

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Hi Skip,

Good suggestion to use the network server and share.
I'll try that option.

Thnx for your quick response.
 
Skip, this works and solves all my problems with different drive letters.
I'm going to this option in all my other macro's.
A star for you !
 
it is the way to go!

If your document is stored on a server, the easiest way to get the path is...
Code:
dim sPath as string

sPath = ThisDocument.Path


Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top