Link to home
Start Free TrialLog in
Avatar of Andreas Hermle
Andreas HermleFlag for Germany

asked on

batch save graphics (save as graphic) that are embedded in a word document using VBA

Dear Experts:

I got a single 3 column word table in the current word document spanning over several pages. It has the following make-up:

User generated image
I wonder whether a macro could achieve the following actions:

...  Save all the graphics (located in column 3) in the same folder where the current document resides ...
...  with the file names taken from the corresponding article number,
...  i.e the following PNG or JPG files would be created when running the macro:
84-415-30-04.png,
84-415-33-04.png,
84-415-34-04.png

I wonder whether thIs is feasible?

I have attached a sample file for your convenience.

Help is very much appreciated. Thank you very much in advance.

Regards, Andreas

Graphics_to_be_extracted_named.docx
SOLUTION
Avatar of GrahamSkan
GrahamSkan
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Andreas Hermle

ASKER

Hi Graham,

thank you very much for your comprehensive answer. I was suspecting this ...

I know this trick ... saving it as html. I will give this a try with this file although I have tried it several times on other occassions and it was kind of a mess to match everything up. Anyhow, I will check now what Ejgil Hedegaard suggests.

Thank you very much for your great help, Graham, I really appreciate it.

Regards, Andreas
Dear Ejgil,

wow, I am truly impressed, great job :-)

I will do some more testing today and then let you know.

Thank you very much for your great support. I really appreciate it.

Regards, Andreas
Hi Ejgil,

wow, just had a look at the VBA code, really impressive. I was just wondering ... saving as png, would that also be possible?

Andreas
Yes that is possible.
Here is a version for saving as png.
Save-pictures-png.xlsm
Hi Ejgil,

this is really fantastic, this saves me and/or my colleagues hours and hours of tedious work. I really appreciate your professional expertise.

Thank you very, very much.  :-)

Andreas
Ejgil: again thank you very much for your superb help, this saves me lots of time :-)

Graham: for the first time  I only award you very few points.  Nevertheless, thank you very much for your insight into this problem, should it be tackled purely with word. for windows.