Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Programmatically convert docx file to doc

Tags:

c#

docx

doc

What options do I have to convert .docx documents to .doc document programmatically using C#? I'm looking to do this as cheaply as possible. Ideally I want to do this directly in code via libraries within the .net framework or via a well establish downloadable dll.

The one constraint we have is that we can't install Office onto our servers.

like image 412
Peanut Avatar asked Jan 14 '10 00:01

Peanut


2 Answers

Consider Aspose.Words. It is a high quality product that is fast, reasonably priced and accurate. Converting documents from docx to doc, even with Word automation may result in data loss and may impact fidelity. This may be very important to some users.

I'm not affiliated with their product.

like image 123
bloudraak Avatar answered Oct 17 '22 18:10

bloudraak


You need to use Microsoft.Office.Interop.Office and Office assembly to convert the Docx file into Doc programmatically. It is part of Visual studio

"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Visual Studio Tools for Office\PIA\Office14"

I am not sure internally these dlls are take support from Office. But you can try on this.Because I converted Doc to ppt file and it is working fine without Office installation on my Machine.

like image 29
Saroop Trivedi Avatar answered Oct 17 '22 18:10

Saroop Trivedi