Reputation: 9221
I'm developing an Outlook form region for meetings in an Outlook add-in using VSTO.
My region factory looks like this:
[Microsoft.Office.Tools.Outlook.FormRegionMessageClass(Microsoft.Office.Tools.Outlook.FormRegionMessageClassAttribute.Appointment)]
[Microsoft.Office.Tools.Outlook.FormRegionName("Notices.MeetingRegion")]
public partial class MeetingRegionFactory
{
// Occurs before the form region is initialized.
// To prevent the form region from appearing, set e.Cancel to true.
// Use e.OutlookItem to get a reference to the current Outlook item.
private void MeetingRegionFactory_FormRegionInitializing(object sender, Microsoft.Office.Tools.Outlook.FormRegionInitializingEventArgs e)
{
var appointment = e.OutlookItem as Outlook.AppointmentItem;
// is appointment a meeting or just an appointment?
}
}
I need to show the form region only for meetings, I don't want to show the form region for plain appointments.
How can I tell appointment is a meeting or just a plain appointment?
Upvotes: 2
Views: 1061
Reputation: 499
You would have to check the MeetingStatus property of the AppointmentItem. The status should show olNonMeeting for simple appointments without attendees.
Upvotes: 4