Jay
Wed Jun 22 19:36:20 CDT 2005
On Wed, 22 Jun 2005 09:03:02 -0700, neil.mclean@conwy.gov.uk
<neilmcleanconwygovuk@discussions.microsoft.com> wrote:
>I need to save files in "My Documents" regardless of where it is. How can I
>use vba to locate the "My Documents folder" being used and save the file to
>it?
>
>Thanks in advance
Unless somebody comes up with a better method, you can dig it out of
the registry like this:
Dim MyDocsPath As String
MyDocsPath = System.PrivateProfileString( _
FileName:="", _
Section:="HKEY_CURRENT_USER\Software\Microsoft\" _
& "Windows\CurrentVersion\Explorer\Shell Folders", _
Key:="Personal")
MsgBox MyDocsPath
--
Regards,
Jay Freedman
Microsoft Word MVP FAQ:
http://word.mvps.org