Programatically saving images from Word

P

Phil Webb

I'm writing to VBA to export a Word document to a proprietory format, and
have yet to find a way to successfully extract images from the document and
save them to jpgs/gifs etc to be referenced from my generated file. Googling
has so far not come up with a suitable solution (plenty of suggestions about
saving as HTML first and then getting the files manually from the exported
doc). Anyone know whether there is a way to SaveAsPicture on an InlineShape
or Shape?

Thanks,
Phil
 
J

Jonathan West

Phil Webb said:
I'm writing to VBA to export a Word document to a proprietory format, and
have yet to find a way to successfully extract images from the document
and save them to jpgs/gifs etc to be referenced from my generated file.
Googling has so far not come up with a suitable solution (plenty of
suggestions about saving as HTML first and then getting the files manually
from the exported doc). Anyone know whether there is a way to
SaveAsPicture on an InlineShape or Shape?


There is no such method available. If you are familiar with Windows API code
for manipulating the clipboard, you could apply the Copy method to the Shape
or InslideShape, and then use API code to copy the clipboard contents to a
file.


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
 

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