Skip to content

Application don't work on another machine

michal adamkiewiczm

Asked Apr 26, 2012, 2:23 AM EDT2 answers
Share
LinkedInX
Hi,

I have a big problem with my application, yesterday I wrote a small app on my personal home computer. I use VS 2008, in the application I added a reference to COM object "Microsoft Outlook Object Library 12.0". This "application" is a silly few lines of code, which iterateru throw an mail items in Outlook 2007. On my home computer, everythinks works perfectlly, but today in the morning I was trying to run it on the target machine, and unfortunatelly I get a expception error, and I don't know what it is:(. On the target computer there isn't installed VS, but framework of course is (the same version as on my personal computer), I googled something and I installed something called: "Office 2007 Primary Interop Assemblies", becouse I thought that It could resolve the problem, but unfortunatelly, application still crush:(. Please help:(. Below I write an error message:

Unhandled Exception: System.InvalidCastException: Unable to cast COM object of type "Sytem.__ComObject" to interface type "Microsoft.Office.Interop.Outlook.MailItem". This operation failed becouse the QueryInterface call on the COM component for the interface with IID: "000634034-0000-0000-C000-000000000046", failed due to the following error: No such interface supported <Exception from HRESULT: 0x80004002 <E_NOINTERFACE>>.

2 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • Mahesh Chand
    0
    You need to have Office Interop registered and installed on the server properly.
    0
  • 0
    On the domain server where Exchange server works?, But if it is a large inter-country network as in my case, when users are couting in thousands....and server is not local? Hmm theres no need for install this Interop only local on the computer?:( How to register it properly?




    P.S. I', sory for my second post on other topic board, I didn't knew which is formaly for those problems;(, sory

    Best Regards
    0