This is a follow up post for Outlook Code: Change the name of the root folder in Outlook 2010 after an SMTP address change. Whilst the sample add-in that I’ve published at that time renamed the root folder in a simple and efficient way, it wasn’t possible to change the Account name, for which reason Outlook users were seeing their old SMTP address in the Mail From field in Outlook which seemed to cause a lot of confusion. To address that, I have written a sample application that updates both the Account name and the root folder display name.
The sample uses Extended MAPI for logging on to the default profile and updating the default store display name (root folder), the Account Management API to access the default account and update the name and the Active Directory Service Interfaces to connect to Active Directory and retrieve the Primary SMTP address corresponding to the SMTP address set as the default account name.
I’m attaching both the code and the compiled executable below.
Image may be NSFW.Clik here to view.
