Want to populate "New Message" window using Extended MAPI in C++

Amol S 21 Reputation points
2021-01-04T18:33:13.657+00:00

Hello There,

I want to populate Outlook "New Message" window programmatically with To and Cc fields populated. Does the Extended MAPI have API for it? Any pointers will be appreciated.

Thanks in advance.
Amol S

Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,684 questions
0 comments No comments
{count} votes

Accepted answer
  1. Jade Liang-MSFT 9,976 Reputation points Microsoft Employee
    2021-01-05T06:41:05.967+00:00

    Hi @Amol S ,
    Welcome to our forum, please kindly understand that here we mainly focus on general issues about Outlook desktop client. We understand that you would like to populate "New Message" window in Outlook, I have tried to searched a lot about it and found 2 similar thread in our Outlook for developer forum:
    Looking to add a new menu item to the 'New Message' window
    Customize Ribbon in the new message dialog

    Hope that would also be helpful to you. If that's invalid, due to our developer forum is migrating and there seems to be no specific outlook for developer tag currently, I added a tag that related to add-in devlopment, so that you would get more information in the point of it, thanks for your understanding.


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Amol S 21 Reputation points
    2021-01-05T09:01:24.8+00:00

    Thanks for the reply.

    I am able to open "New Message" window using below C# code. But when called this dll from Outlook it does not loading. (throwing some exception). Do we have any Extended MAPI C++ API for same?

    Outlook.AppointmentItem appt = (Outlook.AppointmentItem)
    Application.CreateItem(Outlook.OlItemType.olAppointmentItem);
    appt.MeetingStatus = Outlook.OlMeetingStatus.olMeeting;
    Outlook.Recipient recipRequired;
    // mail
    string To = "testuser1@test .com";
    string Cc = "testuser2@test .com";
    string BCC = "testuser3@test .com";
    Outlook.MailItem mailItem = (Outlook.MailItem)
    Application.CreateItem(Outlook.OlItemType.olMailItem);
    mailItem.To = To;
    mailItem.CC = Cc;
    mailItem.BCC = BCC;
    mailItem.Display(true);


  2. Victor Ivanidze 101 Reputation points
    2021-01-07T07:56:58.047+00:00

    OK, do it on C++.

    0 comments No comments