Reputation: 3829
I have an application in which I need to be able to print an existing Word 2007 format document.
Looking around I can't see any free components that will facilitate this without the need for Word to be installed. Does anyone know of any?
Assuming that I have to have Word installed to print the docx file, I was going to use the COM interop assembly. Some of the end users will have Word 2010 installed, some will have Word 2007 installed and some may be using Word 2003 with the compatibility pack installed so that they can view docx files.
2a. How can I determine which version of the COM interop to reference and deploy?
Upvotes: 0
Views: 1149
Reputation: 9100
Another option is to use OpenOffice or LibreOffice.
I've used them for automation when I had pushback on using another Office license. They can also convert Word formats to PDF.
The portable versions are also quite nice -- you don't have to worry about installs.
Upvotes: 1
Reputation: 3084
Microsoft.Office.Interop.Word
should be compatiable with 2007 and 2003.
To check the installed office version though you can do:
new Microsoft.Office.Interop.Word.Application().Version
Upvotes: 3