#1
|
||||
|
||||
Extract embedded images and save according to hyperlink.
I have document containing embedded images.
I want to extract it and name it according to underlying hyperlink. My embedded images are recognized by (modified) code from https://www.msofficeforums.com/word-...mages-web.html I inserted two lines not supported by word. Code:
Sub Demo() Application.ScreenUpdating = False Dim iShp As InlineShape For Each iShp In ActiveDocument.InlineShapes With iShp.Range If .Hyperlinks.Count = 1 Then MsgBox .Hyperlinks(1).Address iShp.Export "D:\" & .Hyperlinks(1).Address & ".png" 'I think not possible. 'or iShp.changenamge ".Hyperlinks(1).Address" 'Don't know about it. End If End With Next Application.ScreenUpdating = True End Sub Is there any way I can export the embedded images as it's hyperlinked name. I know that I can extract it using html or .zip method but it gives image named as "image001.png" format. Is there any way I can do this? Quote:
|
#2
|
||||
|
||||
I don't think it is possible to do exactly what you require, however you may find the latest addition to http://www.gmayor.com/extract_images_from_word.htm useful.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#3
|
||||
|
||||
Thanks for such great tip. After Your answer I learned something about XML. Feeling Great. Trying to make VBSCRIPT XML Parser. Will share my research.
|
Tags |
vba |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How do i include embedded images in a mail-merge? | Hindmost | Mail Merge | 14 | 09-18-2015 02:01 PM |
Opening Embedded objects with a hyperlink | ml920 | Word | 1 | 07-10-2014 09:36 PM |
Extract tables as images | didijaba | Word VBA | 2 | 05-06-2014 06:14 PM |
Source code for embedded images | whitland | Outlook | 0 | 09-06-2011 03:59 AM |
simple way to save embedded images? | Newmarket2 | Drawing and Graphics | 0 | 03-12-2010 12:24 PM |