Ask Learn
Preview
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
In Outlook 2010, there’s a new feature in the Address Book which I’ll call “Choose automatically”. You’ll find it in the Address Book in Tools/Options under the section “When opening the address book, show this address list first:”. It looks like this:
We added this feature to support MultiEx. Before we put the feature in, if you had multiple Exchange mailboxes in the profile, you could only pick one GAL to be your default. If your current mailbox didn’t use that GAL, tough. With “Choose automatically” enabled, Outlook will pick the most appropriate GAL or contact folder for the current mailbox.
I’ll leave the details about which address book gets selected here to someone else. The key issue from a MAPI perspective is that with “Choose automatically” enabled, the Address Book dialog no longer defaults to the container specified by SetDefaultDir. This can result in a poor experience for third party address book providers. Fortunately, you can turn “Choose automatically” off via a setting in the profile.
You’ll find the setting in the IID_CAPONE_PROF profile section. This profile section is widely known on the Internets, but hasn’t been documented before. Here’s the definition:
// Capone profile section
// {00020D0A-0000-0000-C000-000000000046}
DEFINE_OLEGUID(IID_CAPONE_PROF, 0x00020d0a, 0, 0);
You can open that profile section and toggle the feature on and off by setting the PR_AB_CHOOSE_DIRECTORY_AUTOMATICALLY property:
#define PR_AB_CHOOSE_DIRECTORY_AUTOMATICALLY PROP_TAG( PT_BOOLEAN, 0x3D1C)
That’s all there is to it. You don’t even have to restart Outlook, though if you have the Address Book open it obviously won’t take effect until you close and reopen it.
Enjoy!
Anonymous
February 25, 2011
Would you provide a sample code to set it off?
Anonymous
October 02, 2011
The comment has been removed
Anonymous
October 02, 2011
OpenProfileSection wants a pointer to the ID, not the ID itself. So you need to pass &IID_CAPONE_PROF.
Anonymous
January 07, 2012
Hi Stephen,
I have implemented the code and it didn't work if the profile has not changed the address book before.
Test 1: (Success)
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign in