automatically extracting images from word file

B

bof

Can anyone advise if it's possible to extract and save .bmp images
embedded in a Word document using VBA. If yes any pointers to the code
needed?

MTIA
 
B

bof

Shauna Kelly said:
Hi bof

Just save the file as a web page and Word will save each image as a separate
file.

Hi Shauna, thanks for the reply, unfortunately the file is not
displaying the images, giving an error message about lack of memory/disk
space, when it's saved as HTML it creates a blank HTML page, so I was
hoping to try another tack and access them through VBA.
 
C

ChrisHarrington

If you save doc as XML, you will find images in the file as base64
surrounded by a tag like:
<w:binData w:name="wordml://02000001.jpg">
Extract the text and use a base64 to binary converter
 
B

bof

Just a note to say thanks for everyone's input. The problem is now
solved, it was a corrupt file that was causing the problems, fortunately
I never throw anything away and found a good version of the file on a
dusty backup CD from seven years ago. I've now extracted the images by
saving as HTML.
 
D

Doug Robbins - Word MVP

See the following page of fellow MVP Steven Lebans website

http://www.lebans.com/msword.htm

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top