在Excel 2003中,有没有办法从单个目录中读取pdf文件名并将它们放在Excel电子表格中?
答案 0 :(得分:1)
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
添
答案 1 :(得分:0)