Word 2003: Save as XML - with seperate images

  • Thread starter Thread starter Daniel Lord
  • Start date Start date
D

Daniel Lord

In converting Word docs to XML I use the 'Save as HTML' function in
Word XP and then use a laborious process of search and replace
functions to convert to an XML format. However, I've now got a copy of
Word 2003 Beta which promises a much better alternative - using 'Save
as XML' and an XSL transform to my XML spec.

The problem is that the output file has all the images embedded,
rather than as seperate .gif and .jpg files as you get by 'Save as
HTML'.

I would be very grateful if anyone knows if there is an option in Word
that I have missed that allows the images to be saved seperately, or
if anyone knows of a simple technique for extracting the embedded data
into seperate image files.

Thank you for any suggestions
- Daniel
 
Hi Daniel,

If the picture is linked in, to begin with, it will stay as a separate
file.

Otherwise, XML incorporates the data within the file in something called
(I think) Base64. It's supposed to do this, since XML is primarily
considered a data-storage/transfer medium. Using a programming language,
you should be able to extract that and turn it back into a picture. I
don't know how, but I've seen it discussed once or twice. You'd need to
ask in a developer newsgroup.
In converting Word docs to XML I use the 'Save as HTML' function in
Word XP and then use a laborious process of search and replace
functions to convert to an XML format. However, I've now got a copy of
Word 2003 Beta which promises a much better alternative - using 'Save
as XML' and an XSL transform to my XML spec.

The problem is that the output file has all the images embedded,
rather than as seperate .gif and .jpg files as you get by 'Save as
HTML'.

I would be very grateful if anyone knows if there is an option in Word
that I have missed that allows the images to be saved seperately, or
if anyone knows of a simple technique for extracting the embedded data
into seperate image files.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jan 24 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :-)
 
Back
Top