Compiler warning CS0467 for Inspector.Close

L

Lucy

Hi,

I am creating a VSTO add-in in C# for Outlook 2003. I am trying to call the
Inspector.Close method to close the inspector when my CustomAction event is
fired. I am getting this compiler warning and I understand why -
Inspector.close can be a method or an event. But how do I correct this? Here
is my code:

Outlook.Inspector inspector = thisAddIn.mailItem.GetInspector;
inspector.Close(Outlook.OlInspectorClose.olDiscard);

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top