| View previous topic :: View next topic |
| Author |
Message |
antman Newbie

Joined: 28 Mar 2004 Posts: 1
|
Posted: Sun Mar 28, 2004 11:04 am Post subject: Help! - Simple command line conversion of Word doc to XML |
|
|
Hi there,
Apologies if this has been convered before. I tried searching, but it was very time consuming and I only found a few incomplete references to my question.
I would like to automate the conversion of Word files to XML using OpenOffice running on the command line. Do I need to write a macro that will perform the conversion, or does one already exist as part of OpenOffice? I'm looking for the simplest way to achieve this. OpenOffice running on linux is preferable.
Any suggestions?
Thanks in advance. |
|
| Back to top |
|
 |
DannyB Moderator


Joined: 02 Apr 2003 Posts: 4021 Location: Lawrence, Kansas, USA
|
Posted: Sun Mar 28, 2004 11:34 am Post subject: |
|
|
Just what kind of XML do you want to convert Word docs into?
For instance, OOo's native file format is just a zip file of xml. But this is probably not what you want.
I believe OOo could export to, for example, DocBook, but this may not be what you want either.
Exactly what are you trying to do? You obviously want XML, but how do you want it structured? You must have some particular xml based target format in mind, such as DocBook.
Also, you can convert from the command line by using a short macro. From the command line you launch the office exe file with a parameter. The parameter is a url. The url is specially formed such that it activates a short macro that you would have previously stored into the office. The url includes a parameter which points to the document you wish to convert. The macro gets this parameter, opens the source document, saves it in the new target format.
Here are some references to past discussions on this topic....
Document Conversion
===================
List of many past conversion examples
http://www.oooforum.org/forum/viewtopic.php?t=4998
Filter list
http://www.oooforum.org/forum/viewtopic.php?t=3549
Xcel to Calc conversion using the API
http://www.oooforum.org/forum/viewtopic.php?t=2668
A very similar one, converting Xcel to Text
http://www.oooforum.org/forum/viewtopic.php?t=2819
Batch mode conversion
http://www.oooforum.org/forum/viewtopic.php?p=16056#16056
Document conversion
http://www.oooforum.org/forum/viewtopic.php?t=4163
VB: converting Excel files to txt files
http://www.oooforum.org/forum/viewtopic.php?t=3194
General Visual Basic document conversion of Text...
http://www.oooforum.org/forum/viewtopic.php?p=22034#22034
Converting Word -> PDF from the command line
http://www.oooforum.org/forum/viewtopic.php?t=3772
http://www.oooforum.org/forum/viewtopic.php?t=5513
Convert Word --> Writer from the command line
http://www.oooforum.org/forum/viewtopic.php?p=24891#24891
Convert Excel -> PDF from the command line
http://www.oooforum.org/forum/viewtopic.php?t=5596
Convert PPT to HTML from command line...
http://www.oooforum.org/forum/viewtopic.php?t=5137
see tail end of thread...
http://www.oooforum.org/forum/viewtopic.php?t=3772
Converting SXW -> PDF
http://www.oooforum.org/forum/viewtopic.php?t=3017
In Python...
http://www.oooforum.org/forum/viewtopic.php?t=3451
Thread about converting document to PDF in Java
http://www.oooforum.org/forum/viewtopic.php?t=1480
I wrote a batch document converter
http://www.oooforum.org/forum/viewtopic.php?t=3525
http://www.oooforum.org/forum/viewtopic.php?t=2810
http://www.oooforum.org/forum/viewtopic.php?p=10311#10311
you can get it here
http://www.ooomacros.org/files.php?type=macro#DocumentConverter
more discussion of it here...
http://www.oooforum.org/forum/viewtopic.php?t=5708
Macro to save in three formats
http://www.oooforum.org/forum/viewtopic.php?t=3612
http://www.oooforum.org/forum/viewtopic.php?t=5308
http://www.oooforum.org/forum/viewtopic.php?t=3973
http://www.oooforum.org/forum/viewtopic.php?t=3768
http://www.oooforum.org/forum/viewtopic.php?t=3620
http://www.oooforum.org/forum/viewtopic.php?t=3545
http://www.oooforum.org/forum/viewtopic.php?t=3476
http://www.oooforum.org/forum/viewtopic.php?t=3017
Discussion that ends in DocConverter utility.
http://www.oooforum.org/forum/viewtopic.php?t=2668
Convert DBF into XLS, SXC, PDF and HTML
http://www.oooforum.org/forum/viewtopic.php?t=5728 _________________ Want to make OOo Drawings like the colored flower design to the left? |
|
| Back to top |
|
 |
|
|
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
|