error in getting data from outlook

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • prabunewindia
    New Member
    • Mar 2007
    • 199

    error in getting data from outlook

    hi friends,
    i am doing a ASP.NET project that display the mails from the outlook.
    whatever in inbox, outbox, etc.
    when i am getting the mail from inbox, i got the first one(welcome mail from the outlook) correctly.
    but the second(received from system administrator for undelivered) it is showing one error like this
    "Unable to cast COM object of type 'System.__ComOb ject' to interface type 'Microsoft.Offi ce.Interop.Outl ook.MailItem'. This operation failed because the QueryInterface call on the COM component for the interface with IID "

    plz guide me to solve this one
    Prabu
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    Originally posted by prabunewindia
    hi friends,
    i am doing a ASP.NET project that display the mails from the outlook.
    whatever in inbox, outbox, etc.
    when i am getting the mail from inbox, i got the first one(welcome mail from the outlook) correctly.
    but the second(received from system administrator for undelivered) it is showing one error like this
    "Unable to cast COM object of type 'System.__ComOb ject' to interface type 'Microsoft.Offi ce.Interop.Outl ook.MailItem'. This operation failed because the QueryInterface call on the COM component for the interface with IID "

    plz guide me to solve this one
    Prabu
    Prabu, did you ever solve this problem?

    Comment

    • prabunewindia
      New Member
      • Mar 2007
      • 199

      #3
      hi Frinavale,
      thats not a mail item. so i won't need to get that one.
      i completed outlook part of my project.
      I forgot to inform that. sorry for that!
      i posted my work as a article, in article section
      my article

      Prabu


      Originally posted by Frinavale
      Prabu, did you ever solve this problem?

      Comment

      • Frinavale
        Recognized Expert Expert
        • Oct 2006
        • 9749

        #4
        Originally posted by prabunewindia
        hi Frinavale,
        thats not a mail item. so i won't need to get that one.
        i completed outlook part of my project.
        I forgot to inform that. sorry for that!
        i posted my work as a article, in article section
        my article

        Prabu
        Thanks Prabu,

        I was facing a similar problem yesterday. It didn't have anything to do with emails though. I had a new version of a DLL sent to me and ran into that error when I tried to use it.

        I fixed it by re-registering the DLL (had to un-register it, reboot and then re-register it)..then I re-referenced it in my class library and recompiled. I had to re-reference and recompile every other project that used my class library as well.

        This fixed the problem.

        -Frinny

        Comment

        Working...