Reputation: 7314
In Excel 2003 is there any way to read pdf file names from a single directory and put them inside an Excel spreadsheet?
Upvotes: 0
Views: 4718
Reputation: 166306
Dim c as Range, tmp
Dim FolderPath as string
FolderPath = "C:\MyFolder\"
Set c = ActiveSheet.Range("A1")
tmp = Dir(FolderPath & "*.pdf")
Do While tmp<>""
c.value = tmp
set c = c.offset(1,0)
tmp=Dir()
Loop
Tim
Upvotes: 1
Reputation: 2097
To list files from a folder take a look at FileSystemObject.
Provide os more info about what you need, we'll help you better.
Rgds
Upvotes: 0