Hyperlinks ?

G

Guest

I need to import the titles of several hundred PDF files into Excel. Is
there an easy way of doing this ?

One way I had thought of was to create hyperlinks to the documents and then
by editing the hyperlink remove the link but I can't figure a good way to
create multiple hyperlinks at the same time for pasting to Excel.

Any suggestions for the hyperlink approach or alternatives ?
 
B

bigwheel

Hi Dennis L

The way I would tackle this would be to create a directory listing of the
PDF files. Open a command prompt window, at the prompt type DIR *.PDF >
LIST.TXT

Edit the resulting LIST.TXT file and remove the first few lines down to
where the list of the files starts:

Volume in drive C is SYSTEM
Volume Serial Number is 4BAC-78FE

Directory of C:\DOCUMENTS AND SETTINGS
08/10/2003 15:37 50,416 Temp03.pdf

the open the LIST.TXT file with Excel choosing "Fixed width" in the text
import wizard. Then remove the columns showing the date, time and file
size.
 
B

Bob Phillips

Sub ListPDFs()
Dim objFSO As Object
Dim objFolder As Object
Dim objFile As Object
Dim i As Long

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder("c:\MyTest\")
For Each objFile In objFolder.Files
If objFile.Type = "Adobe Acrobat Document" Then
i = i + 1
Cells(i, "A").Value = objFile.Name
End If
Next
Set objFolder = Nothing
Set objFSO = Nothing
End Sub
 

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