Determining Current User's Default E-Mail Account

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way, using VBA in Outlook, to programatically determine what the
currently logged-in profile's default e-mail account is? My company has a
product with customized Outlook functionality, but when the user's Outlook
profile has a different default e-mail account than Exchange (for instance, a
POP account), then we can encounter issues, so we're hoping to detect such a
problem in the setup process. Is it possible to do this using MAPI, or do I
have to check the Windows registry itself? Either way, what is the easiest
way to do this?

Thanks in advance for any help you can provide.
 
2003, XP, and potentially 2000.

Sue Mosher said:
Outlook version?

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
There is no one-size-fits-all method. If WordMail is not the editor, then in Outlook 2002/3, you can read the default account name from the Standard toolbar. (See http://www.outlookcode.com/codedetail.aspx?id=889.) The name of the default account is probably also buried in the Windows registry, under the mail profile settings (and in a totally different place for Outlook 2000 in IMO mode), but it would take a little lab work with Regmon or a registry comparison tool to discover where.
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Back
Top