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:
iShp.changenamge ".Hyperlinks(1).Address" 'Don't know about it.
|
I mean if this eventually change the image name so that while extracting using zip or something It can give the desired result.