+ Reply to Thread
Results 1 to 2 of 2

Automatic Hyperlink Multiple Photos Outside Excel?

Hybrid View

  1. #1
    Registered User
    Join Date
    07-15-2011
    Location
    NY
    MS-Off Ver
    Excel 2007
    Posts
    1

    Automatic Hyperlink Multiple Photos Outside Excel?

    Hi,
    I have and Excel doc for which I need to hyperlink 1000+ photos for viewing.
    I need to automate this hyperlinking.

    For instance:

    The Photos are on C:\\Photos\
    and the Excel files is C:\\testfile.xls

    The final product is the Photos and Excel file will reside on a compact disc as Folder(photos) and Excel File.

    The photos will pop up in default viewer from hyperlink.

    I have searched but can not find the answer

    Thank you for your assistance,
    Andre
    Last edited by pdk123; 07-15-2011 at 11:15 AM.

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Automatic Hyperlink Multiple Photos Outside Excel?

    Try this macro

    Sub Test()
    SubFolder = "photos\"
    SourceFolder = ThisWorkbook.Path & "\" & SubFolder
    Filename = Dir(SourceFolder & "*.*")
    Do While Filename <> ""
        Counter = Counter + 1
        ActiveSheet.Hyperlinks.Add Anchor:=Cells(Counter, 1), Address:=SubFolder & Filename, TextToDisplay:=SubFolder & Filename
        Filename = Dir()
    Loop
    End Sub

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 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