Problem while casting to AppointmentItem type




I am using following code to create appointment items in Outlook:

private Microsoft.Office.Interop.Outlook.Application _Application;
_AppointmentItem oAppointmentItem =

When i try to cast the object to _AppointmentItem type (2nd line)it throws
following exception:

Unable to cast COM object of type 'System.__ComObject' to interface type
'Microsoft.Office.Interop.Outlook._AppointmentItem'. This operation failed
because the QueryInterface call on the COM component for the interface with
IID '{00063033-0000-0000-C000-000000000046}' failed due to the following
error: No such interface supported (Exception from HRESULT: 0x80004002

Any idea why this code doesn't work on some machines with Outlook2003?



Ken Slovak - [MVP - Outlook]

Where is _Application instantiated?

Try using Outlook.AppointmentItem and see if that works. If not, do those
problem machines actually have the PIA's installed?

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