Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
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
?
342 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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.
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

636 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