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

Problem developper exemple : DocumentConverter.java

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





PostPosted: Sat May 01, 2004 5:29 am    Post subject: Problem developper exemple : DocumentConverter.java Reply with quote

Hello,

I use DocumentConverter.java (in java example in sdk OOo) file for my project but i need to convert word to OOo format and now i can just convert OOo to word.
I convert documents OOo .sxw to word format .doc with this argument :

Code:
"c:/tmp" "swriter: MS Word 97"  "doc"


It converts all files in the directory with extension sxw to doc.

But this argument doesn't work :

Code:
"c:/tmp" "MS Word 97: swriter"  "sxw"


It doesn't convert .doc files to .sxw swriter

Please help . Thanks
Back to top
DannyB
Moderator
Moderator


Joined: 02 Apr 2003
Posts: 3991
Location: Lawrence, Kansas, USA

PostPosted: Sat May 01, 2004 7:36 am    Post subject: Reply with quote

excalibur23 wrote:
But this argument doesn't work :
Code:
"c:/tmp" "MS Word 97: swriter"  "sxw"

It doesn't convert .doc files to .sxw swriter


Problem is that "MS Word 97: swriter" is not the name of a valid filter. See one of these discussions for a complete list of valid filter names. Pick one from these lists...

http://www.oooforum.org/forum/viewtopic.php?t=3549
http://www.oooforum.org/forum/viewtopic.php?p=15416#15416
http://www.oooforum.org/forum/viewtopic.php?t=3545
http://www.oooforum.org/forum/viewtopic.php?t=3175
http://www.oooforum.org/forum/viewtopic.php?p=10311#10311

The reason I believe that the 1st argument must be the EXPORT filter name is because of these lines in the source....
Code:
          // Setting the filter name
          propertyvalue[ 1 ] = new PropertyValue();
          propertyvalue[ 1 ].Name = "FilterName";
          propertyvalue[ 1 ].Value = DocumentConverter.stringConvertType;


and this...

Code:
      // Getting the given type to convert to
      stringConvertType = args[ 1 ];



But, I've never tried to use this java program myself. I do it in Basic.

Try a first argument of maybe....

StarOffice XML (Writer)

or maybe...

StarWriter 5.0 (StarWriter/Web)

or pick something else from the list. Good luck.
_________________
Want to make OOo Drawings like the colored flower design to the left?
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