locked
can't cast system.__comobject error RRS feed

  • Question

  • hello ,

    i try to read emails from inbox folder and i get the follwoing exception  any one can help me

    Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.Office.Interop.Outlook.PostItem'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{00063024-0000-0000-C000-000000000046}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE))
    • Moved by OmegaMan Wednesday, April 29, 2009 10:39 PM (From:Visual C# Language)
    Wednesday, April 29, 2009 1:59 PM

Answers

  • Ok this answer might be a couple of years too late :-)

    Use Microsoft.Office.Interop.Outlook.MailItem rather.

    I had the same problem with Microsoft.Office.Interop.Outlook.PostItem

     


    Public Sub Life(ByVal AnyEvent As Object) Dim myNewLife As New Life Dim Happiness As New Collection Happiness.Add(AnyEvent) myNewLife.Experience(Happiness) End Sub
    Monday, October 17, 2011 9:15 AM

All replies