I am developing an Outlook addin that has a button in the custom task pane (which is in the Inspector window). When it is clicked, I want to do something in the current active item (in my case, this appointment is permanent). I have tried this (this code is in the custom work pane class):
Private Zero Button 1_Click (Object Sender, EventArgs e) {Outlook. Inspector Inspector = (Outlook. Inspector) Globals ThisAddIn.Application.ActiveInspector; Outlook.AppointmentItemPTP = (Outlook.AppointmentItem) Inspector. Current item; Appt.Body + = "This is a test"; }
But this is my error:
The law group changed the 'ActiveInspector' to the non-representative type 'Microsoft.Office.Interop.Outlook Can not be done. Inspector '. Do you intend to call this method?
Thanks
I think the active inspector is a method and ; No property.
Try it out - Outlook. Inspector Inspector = (Outlook Inspector) Globals. This addin.app Active Inspector ** () **;
Comments
Post a Comment