dhancy
Board Regular
- Joined
- Jul 10, 2013
- Messages
- 123
- Office Version
- 365
- Platform
- Windows
Hello.
I have this code to map a network drive to the W: drive:
I now want to write additional code to return the path name that is associated with the W: drive.
I found this code:
But t returns this:
\\myPortal.com@SSL\DavWWWRoot\sites\blahblahblah
Is there similar code that will return https://myPortal.com/sites/blahblahblah instead?
Thanks!
Dennis
I have this code to map a network drive to the W: drive:
VBA Code:
Dim MyDriveName As String
MyDriveName = "[B]https://myPortal.com/sites/blahblahblah[/B]"
Set MyDrive = CreateObject("WScript.Network")
MyDrive.MapNetworkDrive "W:", MyDriveName
I now want to write additional code to return the path name that is associated with the W: drive.
I found this code:
Code:
Sub ShowDriveInfo()
Dim fs, d, s
Set fs = CreateObject("Scripting.FileSystemObject")
Set d = fs.GetDrive(fs.GetDriveName(fs.GetAbsolutePathName("W:")))
Debug.Print d.ShareName
End Sub
But t returns this:
\\myPortal.com@SSL\DavWWWRoot\sites\blahblahblah
Is there similar code that will return https://myPortal.com/sites/blahblahblah instead?
Thanks!
Dennis