问题
I'm logging into Outlook 2007 from my application and can enumerate the Accounts.Item[i] objects to look at Account settings.
What I'm unable to find is:
How can I determine (using the Outlook 2007 object model) which one of these is the default Outlook account?
There is no such thing as Store.StoreAccount as suggested here for Redemption (which I don't use).
This SO post does not have an answer
回答1:
Firstly, there are 3 types of accounts - store, mail and address book. Which default account do you need?
Secondly, you can use IOlkAccountManaget object (look at it in OutlookSpy - click IOlkAccountManaget button) if you are using Extended MAPI. Otherwise you can use Redemption and its RDOSession.Accounts.GetOrder method.
来源:https://stackoverflow.com/questions/18058224/how-can-i-determine-the-default-outlook-account