As Stephen updated earlier, Dave had published series of blog posts (given below) which helps you to create Outlook profiles programmatically using MFCMAPI utility to connect Exchange Server 2013/legacy versions of Exchange, Office 365. Adding them for your reference.

How to use MFCMAPI to create a MAPI profile to connect to Exchange 2013 using latest version of MAPICDO?

How to create an Outlook profile for Office 365 using Outlook MAPI?

How to configure an Outlook profile using MFCMAPI for Exchange 2013 using Outlook MAPI?   

How to use the same profile to connect to both Exchange 2013 and legacy versions of Exchange Server using latest version of MAPICDO?  

Note: You can download the latest MAPICDO (May 2013 update) from

Hope this helps. Enjoy!!