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!

Get UNC from Common Dialog

Status
Not open for further replies.

wtstro

Programmer
Aug 1, 2002
15
US
I have a common dialog Active X control on my form. After selecting a file from the dialog box, I insert the .filename returned into a text box on the form. How can I get the dialog box to return the UNC instead of the drive path?
Example -
returns: P:\DirName\FileName.txt
want: \\Server\Share\DirName\FileName.txt

Anyone have a suggestion?

Thanks.
 
I am not sure how to get it out of the box, but you could always search the registry for the drive letter and pick up the UNC name from the appropriate key.....then in whatever code you are working just replace you drive letter with the UNC you found..... Please remember to give helpful posts the stars they deserve! This makes the post more visible to others in need! [thumbsup2]

Robert L. Johnson III, A+, Network+, MCP
Access Developer/Programmer
robert.l.johnson.iii@citigroup.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top