| View previous topic :: View next topic |
| Author |
Message |
maverick786us General User

Joined: 11 Jul 2012 Posts: 26
|
Posted: Wed Jul 11, 2012 2:50 am Post subject: Converting Open Office Document to Microsoft Word |
|
|
I am new to this Open Office Forum.
I have to develop a program that will convert an .ODT document into a .DOCX / .DOC document (MS Word 2010). How can i accompalish this using this Open office SDKs using C#?
As a secondary option If the current version of open office does'nt support conversion into Word 2010 format can it be converted into Word 2007 or 2003 format?
Thanks in Advance |
|
| Back to top |
|
 |
floris_v Moderator


Joined: 12 Jul 2007 Posts: 4601 Location: Netherlands
|
Posted: Sat Jul 21, 2012 12:33 pm Post subject: |
|
|
The conversion filter for the somewhat older Word 97/2000/XP format (as listed in the file formats list in the Save as dialog box) works best, the later Word versions are less well supported.
I moved your question to the Macro and API forum because Code snippets is intended for working code only. _________________ LibreOffice 3.6.3; OOo 3.4.1 on Windows Vista
Join the Official community forum - in several languages, including Nederlandstalig forum |
|
| Back to top |
|
 |
maverick786us General User

Joined: 11 Jul 2012 Posts: 26
|
Posted: Mon Jul 23, 2012 4:36 am Post subject: |
|
|
| floris_v wrote: | The conversion filter for the somewhat older Word 97/2000/XP format (as listed in the file formats list in the Save as dialog box) works best, the later Word versions are less well supported.
I moved your question to the Macro and API forum because Code snippets is intended for working code only. |
Thanks
Can you demonstrate it with some source code? I implemented this source code.
| Code: |
private static void saveDocument(XComponent xComponent, string sourceFile, string destinationFile)
{
PropertyValue[] propertyValues = new PropertyValue[1];
propertyValues[0] = new PropertyValue();
propertyValues[0].Name = "Overwrite";
propertyValues[0].Value = new uno.Any("Microsoft Word 97/2000/XP");
XStorable xcomponent1 = (xComponent) as XStorable;
xcomponent1.storeToURL(destinationFile, propertyValues);
}
|
But the converted file is corrupted when opened in MS Word. 2010 |
|
| Back to top |
|
 |
|