I don't think 2000 has Primary Interop Assemblies so you may want to check
the ILDASM for the imported Outlook Object Model DLL to make sure that the
event you're trying to register for is marked public not private.
Tom
--
Looking for a good book on programming Exchange, Outlook, ADSI and
SharePoint? Check out
http://www.microsoft.com/MSPress/books/5517.asp
This posting is provided "AS IS" with no warranties, and confers no rights.
"Paul Keeley" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
>
>