![]() |
| If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|||||||
| Tags: excel, outlook, path |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
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\" -- Trefor |
| Ads |
|
#2
|
|||
|
|||
|
Application.VBE.ActiveVBProject.References.Item("E xcel").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 On May 28, 4:57*am, Trefor wrote: 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\" -- Trefor |
|
#3
|
|||
|
|||
|
JP,
Not really, but I found the following that will do the trick: UserFile = "C:\Documents and Settings\" & Environ("username") & "\Application Data\......." -- Trefor "JP" wrote: Application.VBE.ActiveVBProject.References.Item("E xcel").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 On May 28, 4:57 am, Trefor wrote: 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\" -- Trefor |
|
#4
|
|||
|
|||
|
"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 - "Trefor" wrote in message ... JP, Not really, but I found the following that will do the trick: UserFile = "C:\Documents and Settings\" & Environ("username") & "\Application Data\......." -- Trefor "JP" wrote: Application.VBE.ActiveVBProject.References.Item("E xcel").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 On May 28, 4:57 am, Trefor wrote: 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\" -- Trefor |
|
#5
|
|||
|
|||
|
It's also different in different operating systems. Try using Environ("appdata") instead.
-- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Dmitry Streblechenko" wrote in message ... "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 - "Trefor" wrote in message ... JP, Not really, but I found the following that will do the trick: UserFile = "C:\Documents and Settings\" & Environ("username") & "\Application Data\......." -- Trefor "JP" wrote: Application.VBE.ActiveVBProject.References.Item("E xcel").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 On May 28, 4:57 am, Trefor wrote: 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\" -- Trefor |
|
#6
|
|||
|
|||
|
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 [MVP-Outlook]" wrote: It's also different in different operating systems. Try using Environ("appdata") instead. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Dmitry Streblechenko" wrote in message ... "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 - "Trefor" wrote in message ... JP, Not really, but I found the following that will do the trick: UserFile = "C:\Documents and Settings\" & Environ("username") & "\Application Data\......." -- Trefor "JP" wrote: Application.VBE.ActiveVBProject.References.Item("E xcel").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 On May 28, 4:57 am, Trefor wrote: 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\" -- Trefor |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Change outlook data file path | Alex Verschoor | Outlook - Installation | 1 | April 21st 08 03:24 PM |
| I have lost a path in outlook mainssp2ff.msp can you help ? | steve | Outlook - Installation | 3 | May 31st 07 02:06 PM |
| creating a motion path in outlook signatures | LM | Outlook - Using Forms | 1 | September 29th 06 06:30 PM |
| change the cache mode path (.ost file path) | bln-ami | Outlook - Installation | 0 | July 18th 06 08:45 AM |
| Getting an Outlook folder using a path | Paddy | Outlook and VBA | 2 | May 25th 06 09:32 PM |