开发者

Get path of Outlook PST file without using Microsoft.Office.Interop.Outlook

I found several web pages explaining how to get the path of Outlook PST files, but they all use Microsoft.Office.Interop.Outlook. I'd like to avoid a dependency to Office interop assemblie开发者_StackOverflows, as they're different for each Office version. Also, this technique is very slow if Outlook isn't already started (since it creates an instance of Outlook).

Is there a simple way to do it without Office interop ?


Look in the registry. This article shows where it would be for Win2000 and WinNT, I'd assume that it would be in similar locations in other versions of Windows.

Quote from article for Win2000: HKEY_CURRENT_USER\Software\Microsoft\Windows NT\Current Version\Windows Messaging Subsystem\Profiles\profilename\

Edit: More information on finding the value. Look at all the subkeys until you find a key called 001f3006 that have the binary for Personal Folders and then look at the other keys in the same folder and one of them contains the path. (Tested on XP with Outlook 2003)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜