Answered by:
How to convert WordML files to other formats using Interop?

Question
-
Hi,
I'd like to use Interop to export my WordML (docx) document to doc, rtf etc. I have seen code of creating it even to PDF with Interop (it didn't seem too complicated, unfortunately I don't have access to it) . Can you give me some advice of how to do it or where I can find any project related to it?
Andris- Edited by nologin Monday, October 13, 2008 6:44 PM
Monday, October 13, 2008 6:43 PM
Answers
-
Good afternoon Andris - I found the below links that should apply (source code!) - hopefully some of the below is what you are looking for; please let me know!
http://www.dot-net-search.com/c%23+code+for+converting+WordML+to+pdf/
Generate PDF Using C#
http://www.codeproject.com/KB/files/generatepdf.aspx
http://www.dot-net-search.com/c%23+code+for+converting+txt+to+rtf/
Converting Word Documents to RTF, HTML, TXT, XML (C# Programming ...
http://www.geekpedia.com/tutorial178_Converting-Word-Documents-to-RTF-HTML-TXT-XML.html
PDF creation using C# (and Office) from RTF/DOC files
http://www.codeproject.com/KB/cs/sertf2pdf.aspx?display=Print
Regards,
Bill Wesse
Escalation Engineer- Proposed as answer by Bill Wesse MSFT Monday, October 13, 2008 7:54 PM
- Marked as answer by David DoBell Friday, October 31, 2008 4:19 PM
Monday, October 13, 2008 7:54 PM -
Hi Andris - Please let us know if you need additional assistance on this thread.
Thanks - Chris- Marked as answer by Chris Mullaney Tuesday, October 21, 2008 10:45 PM
Tuesday, October 21, 2008 10:45 PM
All replies
-
Good afternoon Andris - I found the below links that should apply (source code!) - hopefully some of the below is what you are looking for; please let me know!
http://www.dot-net-search.com/c%23+code+for+converting+WordML+to+pdf/
Generate PDF Using C#
http://www.codeproject.com/KB/files/generatepdf.aspx
http://www.dot-net-search.com/c%23+code+for+converting+txt+to+rtf/
Converting Word Documents to RTF, HTML, TXT, XML (C# Programming ...
http://www.geekpedia.com/tutorial178_Converting-Word-Documents-to-RTF-HTML-TXT-XML.html
PDF creation using C# (and Office) from RTF/DOC files
http://www.codeproject.com/KB/cs/sertf2pdf.aspx?display=Print
Regards,
Bill Wesse
Escalation Engineer- Proposed as answer by Bill Wesse MSFT Monday, October 13, 2008 7:54 PM
- Marked as answer by David DoBell Friday, October 31, 2008 4:19 PM
Monday, October 13, 2008 7:54 PM -
Hi,
Thanks for the tips. I used the Geekpedia link as I needed many formats to be exported to.
As much as I learned, this type of converting takes the actual Office and uses it as a user would use in the Office Orb's Save As command to convert the document that is opened.
I managed to convert to those types except PDF where a COMException was thrown. I'd guess, it requires additional plugins (or a virtual printer) because I can't see the type of PDF in the Save As list but can't say it for sure.
AndrisMonday, October 13, 2008 9:52 PM -
Hi Andris - Please let us know if you need additional assistance on this thread.
Thanks - Chris- Marked as answer by Chris Mullaney Tuesday, October 21, 2008 10:45 PM
Tuesday, October 21, 2008 10:45 PM