Trying to open the new mailItem inspector form within a custom
I got an error "A dialog box is open. Close it and try again."
My code he
Outlook.Application thisApp = Globals.ThisAddIn.Application;
Outlook.NameSpace ns = thisApp.GetNamespace("MAPI");
Outlook.MAPIFolder appointmentFolder = thisApp.Session.GetDefaultFolder(
Outlook.OlDefaultFolders.olFolderCalendar);
object o =
ns.GetItemFromID("000000009408AECE65C0E84BAB4CE89B 19E6944FA4642100",
appointmentFolder.StoreID);
Outlook.AppointmentItem appointmentItem = (Outlook.AppointmentItem)o;
appointmentItem.Display(false); // or true
Jason
|