Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / September 2006

Tip: Looking for answers? Try searching our database.

Find "my document" folder path

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Susan Taylor - 14 Sep 2006 03:06 GMT
I am attempting to find the path of the "my document" folder via VBA.  
The folder has been redirected and in some cases renamed so I can't just
assume that it is located in the usual location.
Any guidance on locating this path in VBA would be greatly appreciated.

Signature

sallisontaylor

Helmut Weber - 14 Sep 2006 15:05 GMT
Hi Susan,

like this:

Dim sTmp As String
Dim wshShell
Set wshShell = CreateObject("WScript.Shell")
sTmp = wshShell.SpecialFolders("MyDocuments")
MsgBox sTmp

Note that there is no space in "MyDocuments" here.

Signature

Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"

Susan Taylor - 15 Sep 2006 01:25 GMT
Helmut,
Thank you -  you make it seem so simple.
this works perfectly!
Signature

sallisontaylor

> Hi Susan,
>
[quoted text clipped - 7 lines]
>
> Note that there is no space in "MyDocuments" here.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.