Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Create an Outlook 2016 MAPI profile with preconfigured OST using C++

This great article by Dave Vespa explains how to create a new Outlook 2016 Profile using MFCMAPI. It even includes a C++ code sample that can be used to automate the task. Unfortunately, I had to make a few modifications to the code before it would compile using Visual Studio 2015 (Community Edition).

Having altered the code, I decided to add support for pre-configuring the Mapi Profile to use a specific OST path. I did this so I could take an existing Outlook 2016 OST (generated on a different computer), and insert it into the new profile - a great way to prevent a user from needing to recache their entire mailbox when moving to a new machine!

You can view the source code, download the entire Visual Studio 2015 solution (120KB), or just grab a copy of the statically compiled executable (200KB).

To run the code, you need to provide three arguments: the name of the profile, the email address of the user, and the path to where a blank OST should be Created. For example:

profiler.exe Outlook [email protected] c:\users\peter\appdata\local\microsoft\outlook\[email protected]  

After running the code, you should be able to replace the empty OST that was created with the user's OST from an existing computer, and then start Outlook using the newly created profile.



This post first appeared on Hinchley.net, please read the originial post: here

Share the post

Create an Outlook 2016 MAPI profile with preconfigured OST using C++

×

Subscribe to Hinchley.net

Get updates delivered right to your inbox!

Thank you for your subscription

×