4

I'm searching for an alternative to Microsoft.Office.interop.Word.dll(Works grea in my Windows 7 but chashes in Windows Server 2008 R2). In many articles in here I see people talking about Microsoft Office Object Library. What is the difference to MS Interop Word and How can I used it? I saw Microsoft Site but Its not clear what's the difference.

I added a reference to Microsoft Office 12 Object Library and a new Dll, Microsoft.Office.Core, is added to the project but I dont know how to use it or where to find documentation about it.

The actions that I performed with Microsoft.Office.Interop.Word were, changing a Logo in the header and Convert a Word document to PDF. Can Microsoft.Office.Core do it?

Documentation, Code snippets and helpfull information are much appreciated.

Thanks in advance, Nelssen

Nelssen
  • 1,023
  • 1
  • 17
  • 42
  • Is Office installed on the server? The interop libraries just let you use Office's COM classes from .NET - Office still needs to be installed. If Office is installed, what problems/errors do you get? – D Stanley Apr 15 '15 at 16:09
  • 1
    Interop is not really made for servers - you _can_ use it, but you **shouldn't** - You can stick to the OpenXML Implementations, which allow you to create Word, Excel, etc. without having Office installed on the server machine. – TGlatzer Apr 15 '15 at 16:35
  • Hello @D Stanley I can't open the files, I've tried a number of things and keep trying but does not work for now, I'll post it in other thread soon. – Nelssen Apr 15 '15 at 17:18
  • Hello @TGlatzer that's valid but openXML does not manage .doc files, so it does no fit my needs :S – Nelssen Apr 15 '15 at 17:19
  • Uhm.. doc files are dead for like 12 years? Must be very legacy, what you are doing.. just saying ;) – TGlatzer Apr 16 '15 at 07:51
  • @TGlatzer Hello I understand that I'm doing a manipulation of a doc file that comes from a web service. that web service does not use docx. that's why I'm stuck to .doc file :/ – Nelssen Apr 16 '15 at 10:56
  • No, Microsoft.Office.Core can't do it. That's a library that Office applications share for features that extend across Office applications. There's SharePoint functionality that can open Office docs in a Server environment and save them to a different file format. But for manipulating the content you'd need to use the binary file format, which can be obtained from Microsoft - search their website. – Cindy Meister Feb 26 '18 at 10:08

0 Answers0