P
Paul Keeley
How do you add a propery page to Outlook 2000 using C#? I tried adding the
event handler using the following code. It compiled fine but generated the
exception at the bottom.
try
{
applicationObject.OptionsPagesAdd += new
Outlook.ApplicationEvents_OptionsPagesAddEventHandler(this.OptionsPagesAdded
);
}
catch (Exception e)
{
System.Diagnostics.Debug.Write(e.ToString());
}
System.InvalidCastException: No such interface supported
at System.Runtime.InteropServices.UCOMIConnectionPoint.Advise(Object
pUnkSink, Int32& pdwCookie)
at
Outlook.ApplicationEvents_EventProvider.add_OptionsPagesAdd(ApplicationEvent
s_OptionsPagesAddEventHandler )
at
Outlook.ApplicationEvents_Event.add_OptionsPagesAdd(ApplicationEvents_Option
sPagesAddEventHandler )
Thanks,
Paul Keeley
event handler using the following code. It compiled fine but generated the
exception at the bottom.
try
{
applicationObject.OptionsPagesAdd += new
Outlook.ApplicationEvents_OptionsPagesAddEventHandler(this.OptionsPagesAdded
);
}
catch (Exception e)
{
System.Diagnostics.Debug.Write(e.ToString());
}
System.InvalidCastException: No such interface supported
at System.Runtime.InteropServices.UCOMIConnectionPoint.Advise(Object
pUnkSink, Int32& pdwCookie)
at
Outlook.ApplicationEvents_EventProvider.add_OptionsPagesAdd(ApplicationEvent
s_OptionsPagesAddEventHandler )
at
Outlook.ApplicationEvents_Event.add_OptionsPagesAdd(ApplicationEvents_Option
sPagesAddEventHandler )
Thanks,
Paul Keeley