Outlook profiles questions

  • Thread starter Thread starter tmaster
  • Start date Start date
T

tmaster

Are there properties or methods of the Outlook object that will answer these
questions?

Q1: When I'm automating Outlook from VB, how do I know how many outlook
profiles are defined on a computer?
Q2: And, which profile is default?
Q3: And, which is the currently selected profile?
Q4: Can I loop through each profile and process its folders?

Also, what exactly is a profile? Is it just a separate PST file?
 
A profile is a collection of MAPI service providers - store providers,
address book providers, transport providers, etc. PST is a store provider
(you can also have Exchange, Notes, GW, etc).
Profiles can be enumerated/modified using Extended MAPI only (or ProfMan
that comes with the distributable version of Redemption, url below, click
Redemption, then Profiles).
If you only need to access stores in all profiles using Outlook Object
Model, read their list from
HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows
Messaging Subsystem\Profiles
then call Namespace.Logon() passing the name of the profile. Be sure to
dereference all Outlook objects before doing so to make sure Outlook does
log to that profile instead of keeping a reference to the previously used
profile.

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