convert word to xml within java application

Does anyone know how I can convert a word document (2003) to xml?

Basically, I want to save it in the format as if you had gone, File, save as, xml from within Word - however this option is not open to me, as i need to somehow incorporate it into my application.

I considered running a macro, then using the VB code, making the filepath/name a parameter so that this could be entered through a GUI, but I have no idea how i would do this, or if there are much better/easier methods.....

Any thoughts?

Thanks

[539 byte] By [clarkana] at [2007-11-26 18:35:37]
# 1
a couple of pointers http://www.xml.com/pub/a/2003/12/31/qa.html http://www.xmlw.ie/aboutxml/word2xml.htm http://www.tagwrite.com/msword_xml.htmlthanks
geomana at 2007-7-9 6:09:42 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2

Geoman,

Thanks for the pointers, but its not what i'm looking for -

I can't buy the software for the conversion, and it needs to be run from a java application. The format of the xml produced is also a consideration, as i need the messy version that word save as function makes, therefore xml conversion tools that create clean xml code is not an option either.

Is it possible to run VB code from within Java?

Thanks again

clarkana at 2007-7-9 6:09:42 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 3
You can do Runtime.exec(...) to run anything executable.
DrClapa at 2007-7-9 6:09:42 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...