Microsoft Office Forums


Reply
Thread Tools Display Modes

VBA code to get path to user's My Documents folder

 
 
DraNoel
Guest
Posts: n/a
 
      08-04-2009, 09:03 PM
I have a Project 2007 VBA script that needs to find the full path to the
current user's My Documents folder. I know this is a simple task in VB.NET
(just reference the MyDocuments property in My.Computer.FileSystem), but is
there a straightforward way to find the path in a VBA script? Thanks.
 
Reply With Quote
 
 
 
 
Rod Gill
Guest
Posts: n/a
 
      08-04-2009, 09:44 PM
Unfortunately not.

--

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:
http://www.projectvbabook.com



"DraNoel" <(E-Mail Removed)> wrote in message
news:56936F74-1828-41BD-9F42-(E-Mail Removed)...
>I have a Project 2007 VBA script that needs to find the full path to the
> current user's My Documents folder. I know this is a simple task in
> VB.NET
> (just reference the MyDocuments property in My.Computer.FileSystem), but
> is
> there a straightforward way to find the path in a VBA script? Thanks.


 
Reply With Quote
 
 
 
 
Seawolf
Guest
Posts: n/a
 
      08-06-2009, 01:27 AM
Chip Pearson has some really good example code on his consulting website :
http://www.cpearson.com/excel/SpecialFolders.aspx.

"DraNoel" wrote:

> I have a Project 2007 VBA script that needs to find the full path to the
> current user's My Documents folder. I know this is a simple task in VB.NET
> (just reference the MyDocuments property in My.Computer.FileSystem), but is
> there a straightforward way to find the path in a VBA script? Thanks.

 
Reply With Quote
 
DraNoel
Guest
Posts: n/a
 
      08-06-2009, 08:26 PM
Seawolf, thanks for the information. My colleague referred me to another
blog site,
http://www.dailydoseofexcel.com/arch...uments-in-vba/.
They suggested an approach using Wxcript, and so far it appears to be
working.

"Seawolf" wrote:

> Chip Pearson has some really good example code on his consulting website :
> http://www.cpearson.com/excel/SpecialFolders.aspx.
>
> "DraNoel" wrote:
>
> > I have a Project 2007 VBA script that needs to find the full path to the
> > current user's My Documents folder. I know this is a simple task in VB.NET
> > (just reference the MyDocuments property in My.Computer.FileSystem), but is
> > there a straightforward way to find the path in a VBA script? Thanks.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Script w/relative path that sends absolute path to a folder to theclipboard? StargateFanNotAtHome@mailinator.com Outlook VBA Programming 3 03-24-2009 01:32 PM
Drive path vs. Network Path S:\Shared\Folder vs. \\NETWORK\USER\FO Author Access VBA Modules 4 08-28-2008 04:31 PM
Remove end folder from path found with ThisWorkbook.Path command ? dim Excel Programming 9 04-23-2008 05:04 AM
Need function to get full path to My Documents folder Bob Valentine Access VBA Modules 2 06-25-2007 03:51 AM
How Can I get the path( file Path) of the Attachment File in the Infopath vasanthaprabu@gmail.com Infopath Newsgroup 0 09-19-2005 12:11 PM


All times are GMT. The time now is 11:15 AM.
Microsoft Office Forums is not affiliated with Microsoft Corporation.


Welcome!
Welcome to the Microsoft Office Forums
 


Latest Threads
Mail Merging Content With High Quality
oleander (Yesterday, 11:59 PM)

Aargh. What is this?
PeteJ (Yesterday, 12:10 PM)

Word 2013 Insert Symbol (Not Responding)
tpthrshr (Yesterday, 02:49 AM)

Can't save a large Word document
Josh (Yesterday, 01:03 AM)

Remote help?
newman200 (04-13-2014, 12:54 PM)