View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Bob Bob is offline
external usenet poster
 
Posts: 972
Default Finding a user's My Documents path

Gary,
Thanks for your help! I will give your code a try tomorrow.
Bob

"Gary Keramidas" wrote:

maybe this

Sub test()
Dim fPath As String
fPath = "C:\Documents and Settings\" & Environ("username") & "\My Documents\"
MsgBox fPath
End Sub

--


Gary


"Bob" wrote in message
...
Is there a way to find a user's complete path to the location of their My
Documents folder and assign that path to a variable called pname?

For example, the complete path to my My Documents folder is:
C:\Documents and Settings\bob\My Documents\

So I would want pname = C:\Documents and Settings\bob\My Documents\

Thanks in advance for any help.
Bob