PC Review


Reply
Thread Tools Rate Thread

Determining Current User's Default E-Mail Account

 
 
=?Utf-8?B?SmFzb24gS2FsbGVsaXM=?=
Guest
Posts: n/a
 
      15th Jun 2005
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.
 
Reply With Quote
 
 
 
 
Sue Mosher [MVP-Outlook]
Guest
Posts: n/a
 
      15th Jun 2005
Outlook version?

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"Jason Kallelis" <(E-Mail Removed)> wrote in message news:3FA77997-6DF9-4B5A-A32E-(E-Mail Removed)...
> 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.

 
Reply With Quote
 
=?Utf-8?B?SmFzb24gS2FsbGVsaXM=?=
Guest
Posts: n/a
 
      15th Jun 2005
2003, XP, and potentially 2000.

"Sue Mosher [MVP-Outlook]" wrote:

> Outlook version?
>
> --
> Sue Mosher, Outlook MVP
> Author of
> Microsoft Outlook Programming - Jumpstart for
> Administrators, Power Users, and Developers
> http://www.outlookcode.com/jumpstart.aspx
>
>
> "Jason Kallelis" <(E-Mail Removed)> wrote in message news:3FA77997-6DF9-4B5A-A32E-(E-Mail Removed)...
> > 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.

>

 
Reply With Quote
 
Sue Mosher [MVP-Outlook]
Guest
Posts: n/a
 
      15th Jun 2005
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
http://www.outlookcode.com/jumpstart.aspx


"Jason Kallelis" <(E-Mail Removed)> wrote in message news:A6861557-E1DF-4FE7-857C-(E-Mail Removed)...
> 2003, XP, and potentially 2000.
>
>> > 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.

>>

 
Reply With Quote
 
Dmitry Streblechenko
Guest
Posts: n/a
 
      16th Jun 2005
See the newly documented IOlkAccountManager interface:
http://msdn.microsoft.com/library/de...HV01155206.asp
You can also play with it in OutlookSpy (click Misc | IOlkAccountManager).

You won't be able to use IOlkAccountManager in VBA though...

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Jason Kallelis" <(E-Mail Removed)> wrote in message
news:3FA77997-6DF9-4B5A-A32E-(E-Mail Removed)...
> 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.



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Determining default mail client at Microsoft Access 2 15th Oct 2010 08:24 PM
Determining the size of my Outlook Mail Account? phil Microsoft Outlook Discussion 3 30th Nov 2007 04:42 PM
Determining the current user's permissions =?Utf-8?B?SGFycnkgSGVucnkgR2ViZWw=?= Microsoft Access VBA Modules 3 7th Jun 2007 06:13 AM
Determining Current User Chaplain Doug Microsoft Access VBA Modules 8 4th Sep 2003 04:33 PM
Start Menu - All Programs - All users/Current user (Default user) Gary Windows XP Security 2 11th Aug 2003 06:52 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:52 AM.