Solved

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

Posted on 2014-04-27
3
338 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 500 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Array problem 6 49
Help to break down spreadsheet 3 42
Need Excel Formula for extract out date only 17 39
HOW CAN I summarize THE REPEAT NUMBERS 3 26
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
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.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

730 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