I've been trying to get the local dynamic user path to work but it doesn't seem to be.
John, what is your original code? Here is what I have but it isn't finding the file. I am using a checkbox and that feature is working but when I have it checked to use the path, it cannot find the file in that path (i.e. default.rdp). I have even tried strPath = Environ("%userprofile%\MyDocu~1") and strPath = Environ("%userprofile%\My Documents")
===> Code <===
strPath = Environ("%userprofile%" & "My Documents")
If RDPConsole.Checked = True Then
strRemoteConnect = ("mstsc /edit " & strPath & "default.rdp /v:") & IPBox1.Text
Else
strRemoteConnect = ("mstsc /v:") & IPBox1.Text
End If
Shell(strRemoteConnect, vbNormalNoFocus)