I was trying different things and searching the internet, desperate for a solution and not far from ripping my hair out, when I finally found this thread where you give the hint to look up the DCOM Config. I couldn’t figure out why that would happen, since both the win service and the winword.exe processes where running under the right user account, which had all the rightsĪnd privileges needed. Office = new Office(OfficeVersion.Office2007)
#BOX OPEN IN WORD DOCUMENT MISSING CODE#
But running the code in a windows service the Method would always return When I executed the code below in a WinForms App (OS: Win7) everything worked fine. Since I want to run my code indepentend to whether Word2003 or Word2007 is installed, I wrote a simple Wrapper Library in which I load the adequate Word Assembly at runtime invoking
Recently I came along a very unnerving and very similiar problem. Ref missing, ref missing, ref missing, ref missing,ĭoc.SaveAs(ref saveas, ref fileFormat, ref missing,Īpp.Quit(ref missing, ref missing, ref missing) Object name = confirmConversions = false
(The website is configured with identity impersonate="true")ĭoes anyone have any idea what is causing this? The code works under ASP.NET on a windows 2000 server with Office 2003. The computer is installed with Vista OS and Office 2007. In the following code the method Documents.Open returns null when running under ASP.NET, while running it in a console the code works fine.