How to show the appointment page from a form region in outlook

276 views Asked by At

I have a very simple outlook form region. It is configured as a separate item, and, it is set to appear whenever a we try to compose a new appointment item. (Meeting request).

enter image description here

Once I click the button above, it should populate the sender and go back to the main appointment page. The code to do that is:

    private void button1_Click(object sender, EventArgs e)
    {
        item.RequiredAttendees = "[email protected]";
        var exp = item.Application.ActiveInspector();
        if (exp == null) Debug.Print("NULL");
        else exp.ShowFormPage("Appointment");
    }

But this doesn't do anything. What is the correct way of doing this?

1

There are 1 answers

0
Eugene Astafiev On BEST ANSWER

Use the SetCurrentFormPage method of the Inspector class to display the specified form page or form region in the inspector.

As a workaround you may try to call the Appointment button programmatically. Use the ExecuteMso method of the CommandBars class to execute the control identified by the idMso parameter. See Office 2013 Help Files: Office Fluent User Interface Control Identifiers for the actual idMso values.