开发者

How to get Outlook 2003 accounts list using Outlook 2003 object model

Is it possible to get list of all existing accounts from Outlook 2003 using only standard COM? It means I can't use Redemption library, but only default Outlook 2003 object model . It's开发者_运维问答 much easy to get accounts at Outlook 2007/2010:

dynamic outlook = AutomationFactory.GetObject("Outlook.Application");
var accounts = outlook.Session.Accounts;

But there is no "Accounts" property for Outlook 2003. By default I can access only default account using "CurrentUser" property. So maybe is there some another way to obtain all accounts (using ONLY Outlook 2003 object model)?


I've finally found answer. I'm not using object model, but I do exactly same as Redemption (read registry). So it's acceptable answer as for me.


The Accounts property is not available in the Outlook 2003 object model. One way to get this information is to use Extended MAPI (MAPI 1.0), and the EnumerateAccounts method of the IOlkAccountManager interface. However, using Extendend MAPI from manage code is discouraged. There are third party wrappers available, a pouplar one being Redemption. Below are a few resources that will be helpful.

http://support.microsoft.com/kb/200018

http://www.codeproject.com/KB/IP/CMapiEx.aspx

http://www.codeproject.com/KB/office/BridgingTheGap.aspx

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜