OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Converting Open Office Document to Microsoft Word

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
maverick786us
General User
General User


Joined: 11 Jul 2012
Posts: 26

PostPosted: Wed Jul 11, 2012 2:50 am    Post subject: Converting Open Office Document to Microsoft Word Reply with quote

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
View user's profile Send private message
floris_v
Moderator
Moderator


Joined: 12 Jul 2007
Posts: 4791
Location: Netherlands

PostPosted: Sat Jul 21, 2012 12:33 pm    Post subject: Reply with quote

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
View user's profile Send private message
maverick786us
General User
General User


Joined: 11 Jul 2012
Posts: 26

PostPosted: Mon Jul 23, 2012 4:36 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group