Excel path in Outlook

  • Thread starter Thread starter Trefor
  • Start date Start date
T

Trefor

In Excel I use "Application.UserLibraryPath" as part of a path to a file. Is
there an equivalent on Outlook that will take me to the same place?

I actually want to get to "C:\Documents and Settings\<username>\Application
Data\"
 
Application.VBE.ActiveVBProject.References.Item("Excel").FullPath

returns the path to the Excel object library, which in Excel's case is
the Excel executable file itself. Assuming, of course, you have set a
reference to the Excel object library in Outlook.

Does that help?

--JP
 
JP,

Not really, but I found the following that will do the trick:

UserFile = "C:\Documents and Settings\" & Environ("username") &
"\Application Data\......."
 
"Application Data" is locale specific and will be different under
non-English versions of Windows.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
 
It's also different in different operating systems. Try using Environ("appdata") instead.
 
Sue / Dmitry,

Thanks for you comments.

In my case the file I am looking for was put there using the same path and
my code is only deployed in 2000/XP Office 2003 environments, but I take your
point.

Thanks.

--
Trefor


Sue Mosher said:
It's also different in different operating systems. Try using Environ("appdata") instead.
 
Back
Top