By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,327 Members | 2,627 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,327 IT Pros & Developers. It's quick & easy.

error in getting data from outlook

prabunewindia
100+
P: 199
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.__ComObject' to interface type 'Microsoft.Office.Interop.Outlook.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
Apr 27 '07 #1
Share this Question
Share on Google+
3 Replies


Frinavale
Expert Mod 5K+
P: 9,731
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.__ComObject' to interface type 'Microsoft.Office.Interop.Outlook.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?
Jun 11 '07 #2

prabunewindia
100+
P: 199
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


Prabu, did you ever solve this problem?
Jun 12 '07 #3

Frinavale
Expert Mod 5K+
P: 9,731
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
Jun 12 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.