?
Solved

Extract URLs from a series of icons with embedded links which have been pasted into Excel

Posted on 2014-04-27
3
Medium Priority
?
341 Views
Last Modified: 2014-05-15
Hello,

Is there a non-manual way to extract URLs from a series of icons with embedded links which have been pasted into Excel?

For example, suppose you are on a website page which displays a list of articles or maybe chapters of a book. And suppose that for each chapter, there is a link which you can click if you want to read that chapter (in HTML) and also an icon link (like an image of a speaker) which you can click if you want to listen to an audio file of the chapter.

If I copy that page and then paste it into an Excel spreadsheet with the origin formatting, then the result will contain both the HTML links and the icons with their links. There's some re-formatting required but before long, I can create a nifty list in which each of the HTML links behaves in the same way any other cell defined as a link does.

However, I am trying to figure out how to do the same thing with the audio file links. I've got the string of icons in front of me and each still has its link but they of course behave like images pulled in from PowerPoint. Any single icon's link can be obtained by right-clicking the icon then clicking "edit hyperlink" and so on but I am hoping to find a way to capture all of the audio link destination URLs en masse.

Suggestions?

Thanks
0
Comment
Question by:WeThotUWasAToad
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 18

Expert Comment

by:Rartemass
ID: 40026618
How I generally start with something like this is to begin recording a macro and then perform the steps I want to achieve.
So if you can select the icon and right click to edit hyperlink and copy/paste it elsewhere, the macro should create the code. Then you can modify it to select all images and iterate through them with a loop.
It would be easier to give specific advise if we could see sample data you are working with.
0
 
LVL 27

Accepted Solution

by:
MacroShadow earned 2000 total points
ID: 40026634
Try this:
Sub ExtractHyperlinks()

    Dim sh As Shape

    On Error Resume Next ' if shape is not directly over a cell an error will be thrown, skip that shape
    
    For Each sh In ActiveSheet.Shapes
        sh.TopLeftCell.Offset(, 1) = sh.Hyperlink.Address
    Next

End Sub

Open in new window

0
 

Author Closing Comment

by:WeThotUWasAToad
ID: 40068948
Thanks
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question