Skip to content

microsoft/FixContab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FixContab

Simple program to reorder MAPI providers so the Contact Address Book is first.

The Problem

Suppose you've created a profile programatically. Perhaps you followed Dave's steps given here or here. Those steps focus (rightly) on getting the profile to connect to Exchange, since that's the hard part. One thing you might not have considered, is adding the Contact Address Book (aka contab). That's fine - when you use the profile the first time, MAPI will add the provider for you! And this is where we hit a problem: MAPI assumes that contab will be the first address book provider loaded. When it's not, it gets all flustered, and you have crashes in programs other than Outlook. For instance, using Send To -> Mail Recipient explorer might crash with the error "FIXMAPI 1.0 MAPI Repair Tool has stopped working". This issue spawned many forum reports.

If you're running Office 365 (aka Click To Run aka c2r), then we fixed this in build 16.0.8420.1000. But if you're running Office 2016 MSI, or still have Outlook 2013, you're out of luck. The fix was too complicated to backport without risking further breaks.

The Solution

As noted in the forum reports, deleting and recreating the profile in Outlook solved the problem. This is because in new profile creation, Outlook always adds contab first.

But maybe you don't want to recreate the profile. Maybe you want to use MFCMAPI to fix it? These steps work, but are super complicated:

  1. Start MFCMAPI with Outlook closed
  2. Profile/Show Profiles
  3. Double-click profile
  4. Locate and click on the row with PR_DISPLAY_NAME of Outlook Address Book and PR_SERVICE_NAME of CONTAB.
  5. In the bottom pane, look for PR_AB_PROVIDERS.
  6. Open this property and copy out the Binary section. It should be 16 bytes/32 characters. For instance, this is what I have:
    69DD16E10828474F9F31C1F39A27111D
  7. Actions/Open Profile Section
  8. Paste in the following guid and check the “Byte swapped” checkbox:
    9207F3E0A3B11019908B08002B2A56C2
  9. A new set of properties should load in the bottom pane, including one named PR_AB_PROVIDERS
  10. Open this property and copy out the Binary section. The count of bytes of this section should be a multiple of 16, for a multiple of 32 characters. For instance, in a broken profile I built, it looked like this:
    EE9B4F3DEAC0BC4CA3BBCA0F842FED3E69DD16E10828474F9F31C1F39A27111D
  11. Divide this string in to 32 character chunks, like so:
    EE9B4F3DEAC0BC4CA3BBCA0F842FED3E
    69DD16E10828474F9F31C1F39A27111D
  12. See that one of those chunks is the string we copied from the PR_AB_PROVIDERS property for Contab:
    69DD16E10828474F9F31C1F39A27111D
  13. We want this entry to be first in the list, so move it to the top:
    69DD16E10828474F9F31C1F39A27111D
    EE9B4F3DEAC0BC4CA3BBCA0F842FED3E
  14. And merge the list back to a single string:
    69DD16E10828474F9F31C1F39A27111DEE9B4F3DEAC0BC4CA3BBCA0F842FED3E
  15. Back in the property we were looking at in step 10, replace the original Binary section with the new string.
  16. Close the dialog (this will save) and close MFCMAPI.
  17. Start Outlook.

About

Simple program to reorder MAPI providers so the Contact Address Book is first.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks