Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-29-2016, 12:38 AM
PRA007's Avatar
PRA007 PRA007 is offline Extract embedded images and save according to hyperlink. Windows 7 64bit Extract embedded images and save according to hyperlink. Office 2010 32bit
Competent Performer
Extract embedded images and save according to hyperlink.
 
Join Date: Dec 2014
Location: Ahmedabad, Gujrat, India
Posts: 145
PRA007 is on a distinguished road
Default 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:
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.
Reply With Quote
  #2  
Old 01-31-2016, 06:55 AM
gmayor's Avatar
gmayor gmayor is offline Extract embedded images and save according to hyperlink. Windows 10 Extract embedded images and save according to hyperlink. Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,106
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

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
Reply With Quote
  #3  
Old 02-05-2016, 01:46 AM
PRA007's Avatar
PRA007 PRA007 is offline Extract embedded images and save according to hyperlink. Windows 7 64bit Extract embedded images and save according to hyperlink. Office 2010 32bit
Competent Performer
Extract embedded images and save according to hyperlink.
 
Join Date: Dec 2014
Location: Ahmedabad, Gujrat, India
Posts: 145
PRA007 is on a distinguished road
Default

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.
Reply With Quote
Reply

Tags
vba



Similar Threads
Thread Thread Starter Forum Replies Last Post
Extract embedded images and save according to hyperlink. How do i include embedded images in a mail-merge? Hindmost Mail Merge 14 09-18-2015 02:01 PM
Extract embedded images and save according to hyperlink. 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

Other Forums: Access Forums

All times are GMT -7. The time now is 09:20 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft