- Subject: Re: Inspector.Close event is not fired
- Author: Md.A.RaheeM
- Date: 26 Feb 2010
- References:
Hi Sir..
i tried to use ur code block in C# VS2008...:
// at class level
private Outlook.ItemsEvents_Event m_events;
private Outlook.ContactItem m_contact;
// in init code
m_events = (Outlook.ItemEvents_Event)m_contact;
m_events.Close += new Outlook.ItemEvents_CloseEventHandler(m_contact_Close);
// event handler
private void m_contact_Close(ref bool Cancel)
{
// whatever
}
but i am getting two errors as below:
1) 'Microsoft.Office.Interop.Outlook.ItemsEvents_Event' does not contain a
definition for 'Close' and no extension method 'Close' accepting a first
argument of type 'Microsoft.Office.Interop.Outlook.ItemsEvents_Event' could
be found (are you missing a using directive or an assembly reference?)
2) Cannot implicitly convert type
'Microsoft.Office.Interop.Outlook.ItemEvents_Event' to
'Microsoft.Office.Interop.Outlook.ItemsEvents_Event'. An explicit conversion
exists (are you missing a cast?)
plz help me on this..... by providing solution on how to disable the
default close(x) button of Inspector window
--OR--
let me know how to catch the Item.close event / Inspector.Close Event...
Thanks
Regards
Md.A.RaheeM