Hi,
background:- I already developed office automation in my web site. where i done lot of settings like, IMPERSONATION, COM security, IIS and it is working as per required. but all these done for MICROSOFT OFFICE 2003. as far as good. no issue.
Problem:- by now i required to setup my application with MS Office 2010 and 2007 on two different servers. I started with 2007 and when i installed office 2007 and interop for 2007 on my development machine it is not working so i created a dummy application and it is working if i am not using IIS but when i configured this dummy application in IIS than it stops to work.
Key problem is wordDocument is null. so code is not able to open the document. Path impersonation is Okay.
Code:-
object file = @"c:\test\01\test.doc";
ApplicationClass wordApp = new ApplicationClass();
object readOnly = false;
object isVisible = true;
object missing = System.Reflection.Missing.Value;
Document wordDocument = wordApp.Documents.Open(ref file, ref missing, ref readOnly, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref isVisible, ref missing, ref missing, ref missing, ref missing);
I am not able to understand why it is null.