WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Problem while casting to AppointmentItem type

 
   Home -> Office -> Interoperability RSS
Next:  pst file emptied after running scanpst  
Author Message
kiranpatil1983

External


Since: Apr 09, 2008
Posts: 1



(Msg. 1) Posted: Wed Apr 09, 2008 3:08 pm
Post subject: Problem while casting to AppointmentItem type
Archived from groups: microsoft>public>outlook>interop (more info?)

Hi,

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

private Microsoft.Office.Interop.Outlook.Application _Application;
_AppointmentItem oAppointmentItem =
(_AppointmentItem)m_Application.CreateItem(OlItemType.olAppointmentItem);


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
(E_NOINTERFACE))

Any idea why this code doesn't work on some machines with Outlook2003?
Back to top
Login to vote
Ken Slovak - [MVP - Outlo

External


Since: Oct 17, 2003
Posts: 2898



(Msg. 2) Posted: Thu Apr 10, 2008 9:51 am
Post subject: Re: Problem while casting to AppointmentItem type [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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?

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"kiranpatil1983" <kiranpatil1983.TakeThisOut@discussions.microsoft.com> wrote in message
news:F07FD800-054E-433E-9368-FFCA0DC17925@microsoft.com...
> Hi,
>
> I am using following code to create appointment items in Outlook:
>
> private Microsoft.Office.Interop.Outlook.Application _Application;
> _AppointmentItem oAppointmentItem =
> (_AppointmentItem)m_Application.CreateItem(OlItemType.olAppointmentItem);
>
>
> 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
> (E_NOINTERFACE))
>
> Any idea why this code doesn't work on some machines with Outlook2003?
Back to top
Login to vote
Display posts from previous:   
       Home -> Office -> Interoperability All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows XP
 Windows Vista
 Windows Other
  Office
 Office Other
 Security
 WinRAR
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET