How to get the Outlook start folder via the outlook COM-Object
-
2012年7月15日 下午 03:47Is it possible to get the outlook start folder (folder that appears, when outlook will be started) via the outlook COM-object? It is not one of the default folders.
所有回覆
-
2012年7月15日 下午 06:18
Hi,
I don't think there is a direct way to get the default start folder.
However, you can use the Application_Stratup event to get the CurrentFolder of ActiveExplorer:
Private Sub Application_Startup()
ID = Application.ActiveExplorer.CurrentFolder.EntryID
End SubMoshe
- 已提議為解答 Tom_Xu_WXModerator 2012年7月16日 上午 06:57
- 已標示為解答 Tom_Xu_WXModerator 2012年7月18日 上午 06:37
- 已取消標示為解答 milonass 2012年7月18日 上午 06:52
-
2012年7月18日 上午 06:55Unfortunately this is not working. I am using the Outlook View Control. The related application object does not give an valid ActiveExplorer object. It is always a null pointer.
-
2012年7月19日 下午 03:20版主
Hi,
Unfortunately, I don't believe there's a way to determine this from the View Control. You would need to to automate Outlook separately, or use MAPI since this setting is stored in the MAPI profile.
Bill Jacob - Microsoft Customer Service & Support - Developer Messaging
-
2012年7月19日 下午 08:50
Do you have an example how to get the profile from MAPI object?
Thanks and regards.
-
2012年7月20日 下午 09:13版主
Hi,
Just to make sure you are aware, MAPI is only supported from fully unmanaged code, so I'm not sure if that will ultimately be an option for you. I'm not aware of a specific example for this, but to get started with profiles, there is this older KB article:
306962 How to create MAPI profiles without installing Outlook
http://support.microsoft.com/kb/306962/EN-USAnd in general MFCMAPI also has code for accessing profiles:
http://mfcmapi.codeplex.com
Bill Jacob - Microsoft Customer Service & Support - Developer Messaging
- 已標示為解答 milonass 2012年7月21日 下午 07:19

