+ Reply to Thread
Results 1 to 15 of 15

How do i create multiple hyperlinks to various pdf files?

  1. #1
    Registered User
    Join Date
    06-10-2013
    Location
    Bryant, Arkansas
    MS-Off Ver
    Excel 2010
    Posts
    8

    How do i create multiple hyperlinks to various pdf files?

    I am trying to hyperlink cells to a pdf that is named the same as what is in column A. I have a very basic knowledge of visual basic and i'm afraid anything other than copy and paste will be over my head. excel workbook.xls

    Thank you
    Michael

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: How do i create multiple hyperlinks to various pdf files?

    Michael

    I'm a little confused as you seem to have hyperlinks in column A already.

    If you did want to create hyperlinks from the content of a cell you could use the HYPERLINK worksheet function.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    06-10-2013
    Location
    Bryant, Arkansas
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: How do i create multiple hyperlinks to various pdf files?

    Yes I have done those by hand and the list has about 200 more I was hoping for a faster solution
    Last edited by Mtlittleton; 06-10-2013 at 01:39 PM.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: How do i create multiple hyperlinks to various pdf files?

    Well HYPERLINK should be pretty fast.

    All you would need to do is put it in and copy down.

    Or if you really want code use the BeforDoubleClick event and FollowHyperlink.
    Last edited by Norie; 06-10-2013 at 01:39 PM.

  5. #5
    Registered User
    Join Date
    06-10-2013
    Location
    Bryant, Arkansas
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: How do i create multiple hyperlinks to various pdf files?

    Each cell is a different document though.

  6. #6
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: How do i create multiple hyperlinks to various pdf files?

    The HYPERLINK function creates a link for whatever document you supply the URL for

    Where would the URL for each document come from?

  7. #7
    Registered User
    Join Date
    06-10-2013
    Location
    Bryant, Arkansas
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: How do i create multiple hyperlinks to various pdf files?

    I think i may have confused us both, let me start over. What i am trying to do is create hyperlinks to different documents on my harddrive. Each cell is a different PDF file for example the top section "Main Steam Piping System" the links in column A go to a mechanical drawing and, each row represents a different drawing. for example the target location is "R:\Bailey Pipe Hangers\BAILEY PIPE HANGER DETAILS\Main Steam (H1)\H1-1.pdf" for cell A7. I was hoping to find a macro that would go down the column and turn the contents in to link to that pdf what shares the same title, with out having to go down the list and right click everyone and add the hyperlinks manually. Since i have been messing with this i have broken all the links that i had put in manually and don't really want to go back and it all again.

    Does that make more sense?
    Thank you
    Michael

  8. #8
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: How do i create multiple hyperlinks to various pdf files?

    Michael

    I think I know what you want to do.

    What I don't know how you are arriving at the URLs for the documents.

    To use any method, VBA or formula, to create hyperlinks URLs would be needed.

    I looked at the URLS and I thought there was some sort of pattern but it wasn't consistent, different 'sections' used a different pattern.

    For example the hyperlinks in the first 3 sections seem to follow this pattern,

    \\arkansaselectric.com\FileShares\UserShares\MLittleton\Bailey Pipe Hangers\BAILEY PIPE HANGER DETAILS\<section name> (Hx)\1.pdf

    but then in the BF Attemptorator and Boiler Feed Discharge sections you get this sort of thing.

    \\arkansaselectric.com\FileShares\UserShares\MLittleton\Bailey Pipe Hangers\BAILEY PIPE HANGER DETAILS\<section name> (Hx-n - Hx-m)\1.pdf

    Getting the actual filename is straightforward, it's the rest of the URL that's the problem.

  9. #9
    Registered User
    Join Date
    06-10-2013
    Location
    Bryant, Arkansas
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: How do i create multiple hyperlinks to various pdf files?

    Oh ok i see what you are talking about the (Hx) after the section name was just me trying to keep up with what drawings are in what folder those can be removed if needed

  10. #10
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: How do i create multiple hyperlinks to various pdf files?

    So would it just be the section name followed by the filename?

  11. #11
    Registered User
    Join Date
    06-10-2013
    Location
    Bryant, Arkansas
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: How do i create multiple hyperlinks to various pdf files?

    yes it would

  12. #12
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: How do i create multiple hyperlinks to various pdf files?

    Michael

    I've been looking at this and I've come up with this which is very much a work in progress.
    Please Login or Register  to view this content.
    It seems to be producing the correct URLs for most sections but there's a problem with the sections in rows 85 to 283 where the header is followed by IsoX.

    When that's the case the folder to find the file in is IsoX rather than the section header.

    PS I know the code doesn't create hyperlinks, I wanted to make sure of getting the correct URLs before adding a whole bunch of invalid hyperlinks.

    Once that's done the code to add the hyperlinks is pretty straightforward.

    Actually just realised how it should be possible to ignore the IsoX.

    Here's the updated code.
    Please Login or Register  to view this content.

  13. #13
    Registered User
    Join Date
    06-10-2013
    Location
    Bryant, Arkansas
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: How do i create multiple hyperlinks to various pdf files?

    It does create the correct URL on my end.Bailey Pipe Hanger.xlsx

  14. #14
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: How do i create multiple hyperlinks to various pdf files?

    Good.

    All we need now is the code to add the hyperlinks.

    Bit rusty with that, and obviously can't test, but give this a shot.
    Please Login or Register  to view this content.

  15. #15
    Registered User
    Join Date
    06-10-2013
    Location
    Bryant, Arkansas
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: How do i create multiple hyperlinks to various pdf files?

    Awesome works perfectly thank you

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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