Hyperlink Macro to 2,500 PDF files?

B

binar

Fellow Forum Members,
I have 2,500 PDF ebooks on a variety of subjects all contained in one
folder named "Ebooks". I already have all the 2,500 ebook titles
inside Excel in Column A, Sheet 1. Now I want to hyperlink each title
to the actual PDF file and doing this hyperlink operation 2,500 times
is something I want to avoid like the plague. Can anyone out there
please help me in developing a macro that would do this hyperlink
operation automatically 2,500 times?

I'm not a macro expert, but is it not possible to make Excel
automically go to the same Ebook folder 2,500 times and then
automatically generate the hyperlink? Evenmore, is it even necessary
to setup a text list inside Excel that mirrors the list in the Ebook
folder? In other words, is it possible to start with a blank Excel
worksheet and then design a macro that will not only automatically
hyperlink but at the same time it's hyperlinking it's also generating
the ebook pdf list within Excel? Any help will be greatly appreciated
because such a Macro would be a tremendous time saver.

Cheers,
Binar
 
J

Jim Cone

The free Excel add-in "List Files" will do that.
Download from ... http://www.realezsites.com/bus/primitivesoftware
No registration required.

Note: If those obscene spam messages coming from the excelforum
continue then this will be my last reply to any post from there.

--
Jim Cone
San Francisco, USA


"binar"
<[email protected]>
wrote in message
Fellow Forum Members,
I have 2,500 PDF ebooks on a variety of subjects all contained in one
folder named "Ebooks". I already have all the 2,500 ebook titles
inside Excel in Column A, Sheet 1. Now I want to hyperlink each title
to the actual PDF file and doing this hyperlink operation 2,500 times
is something I want to avoid like the plague. Can anyone out there
please help me in developing a macro that would do this hyperlink
operation automatically 2,500 times?

I'm not a macro expert, but is it not possible to make Excel
automically go to the same Ebook folder 2,500 times and then
automatically generate the hyperlink? Evenmore, is it even necessary
to setup a text list inside Excel that mirrors the list in the Ebook
folder? In other words, is it possible to start with a blank Excel
worksheet and then design a macro that will not only automatically
hyperlink but at the same time it's hyperlinking it's also generating
the ebook pdf list within Excel? Any help will be greatly appreciated
because such a Macro would be a tremendous time saver.

Cheers,
Binar
 
E

Excelenator

Code
-------------------
Sub CreatePDFDirectory()
Dim path As String
Dim f As Integer
path = "YOUR PATH HERE"
f = 1

With Application.FileSearch
.LookIn = path
.FileType = msoFileTypeAllFiles
.Execute
For i = 1 To .FoundFiles.Count
If UCase(Right(.FoundFiles(i), 3)) = "PDF" Then
Range("A" & f).Value = .FoundFiles(i)
ActiveSheet.Hyperlinks.Add Anchor:=Range("A" & f), _
Address:=.FoundFiles(i), TextToDisplay:=.FoundFiles(i)
f = f + 1
End If
Next i
End With

End Su
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top