I have a windows service (currently running under Windows 2003 Server) that needs to interact with a few word documents using automation. This Service needs to move to a new server.
Is it possible to install and invoke word documents in a Windows 2008 R2 Server Core Machine?
Regular Word automation is not supported when running as a service (including things like ASP.NET). It is a desktop client application with an API to automate that application, not an API to the Word subsystem.
You might try looking at Word Automation Services, but note that this is a SharePoint Server 2010 component.
I would strongly recommend looking at alternatives, such as the various tools (some free, some not) for writing Word documents, or other file formats.
It seems moot, but I also doubt that Word will work on server-core. It is heavily stripped down for scoped server usage, and will be missing many things that a desktop client application will want to use.
I would you recommend to use Open XML SDK 2.0 for Microsoft Office. On XML in Office Developer Portal, "How to: Word Processing with respect of Open XML SDK 2.0" and http://openxmldeveloper.org/ you will find a lot of example how to use Open XML SDK 2.0.
Open XML SDK 2.0 is technology special for the usage on the server. You don't need to install Office on the server at all and will be read, modify etc. office documents on the server. At the beginning the switching from Word automation to Open XML SDK seems difficult, but I do recommend you invest a little time to study the technique. In a short time you will be lucky to use it on the server. Some interesting code examples and utilities you will also find of the codeplex.com (just search for "Open XML"). For example look at Demo 04 from http://openxmldemos.codeplex.com/.
Yes, just use a silent install to get Office 2007 on your Server Core box - refer to TechNet's Office Resource Kit for deployment options. A couple of notes:
.Visible = True
. It will result in failure.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With