+ Reply to Thread
Results 1 to 5 of 5

Code Printing list of hyperlinks in excel file

  1. #1
    Forum Contributor
    Join Date
    11-21-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2007,2013
    Posts
    159

    Code Printing list of hyperlinks in excel file

    Any code for printing list of hyperlinks in excel file? sample file attached.
    Attached Files Attached Files
    Click * below if this answer helped

  2. #2
    Valued Forum Contributor ranman256's Avatar
    Join Date
    07-29-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    1,192

    Re: Code Printing list of hyperlinks in excel file

    can you not just do File, Print?

  3. #3
    Forum Expert
    Join Date
    10-02-2014
    Location
    USA
    MS-Off Ver
    2016
    Posts
    1,222

    Re: Code Printing list of hyperlinks in excel file

    If you are actually using Excel 2013+, enable the Inquire add-in, click workbook analysis and there is a checkbox for hyperlinks. Will generate a sheet with a list of them that you can print.

    Be aware that "hyperlinks in a file" is a very broad term. I am presuming you mean "hyperlinks in cells". The above will give you that. To actually get all the hyperlinks in a file is a monumental task given the many places hyperlinks can be used and the many ways they can be constructed. Its further complicated if by hyperlinks you actually mean links to external data, the difference being a hyperlink traditionally being a clickable link to go to some resource/data and an external link acting as a data source to your workbook.

    For example; named ranges and conditional formats can have external links/hyperlinks in them, but would not be shown as hyperlinks by any feature or code I know of directly. Also, there is a HYPERLINK formula, which technically isnt a hyperlink until the function calculates. Combine HYPERLINK with something like INDIRECT and it becomes an even more complex effort. If hyperlink means external link, you have your work cut out for you as cells, named ranges, conditional formats, etc can contain multiple external links in a single cell, name or rule. At that point you have to parse the information and "find" the link/external data source inside of the entire contents.

    Maybe if we knew why you wanted to do this we could better help as there could be a better way other than just listing out all hyperlinks.
    Ways to get help: Post clear questions, explain your overall goal, supply as much background as possible, respond to questions asked of you by those trying to help and post sample(s) files.

    "I am here to help, not do it for people" -Me

  4. #4
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Code Printing list of hyperlinks in excel file

    For your sample workbook, which lists all the file paths and names and all are workbooks, you might simply use something like this
    Please Login or Register  to view this content.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  5. #5
    Forum Expert
    Join Date
    10-02-2014
    Location
    USA
    MS-Off Ver
    2016
    Posts
    1,222

    Re: Code Printing list of hyperlinks in excel file

    It may be faster to just loop the hyperlink objects in the hyperlink collection, see https://msdn.microsoft.com/en-us/vba...s-object-excel

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Code for printing a hyperlinked file to be exact excel file.
    By reimar_rem in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-24-2018, 05:20 AM
  2. macro code for printing pages through the dropdown list in a cell
    By neerajarora80 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-18-2015, 03:10 AM
  3. Excel VBA code needs to have list only 1 type of file
    By excel13 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-29-2013, 05:18 PM
  4. Need a VB code (file names, hyperlinks, picture comments)
    By jeseravi in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-07-2012, 10:19 PM
  5. Automatically insert hyperlinks to list of file
    By gsrai31 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 07-28-2010, 07:45 AM
  6. Printing a .txt file with VBA code?
    By PingPing in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-11-2010, 10:45 PM
  7. Replies: 0
    Last Post: 05-14-2006, 11:45 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1