简体   繁体   中英

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

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).

在此处输入图片说明

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 = "John.Doe@contoso.com";
        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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM