davidtown23
12-06-2006, 07:23 AM
I have this code for processing a list:
Sub ProcessFiles()
Dim fso As Object
Dim i As Long
Dim sFolder As String
Dim Folder As Object
Dim File As Object
Dim Files As Object
Dim cnt As Long
Set fso = CreateObject("Scripting.FileSystemObject")
sFolder = "Q:\06009 Fayette Memorial Hospital - Heart Center Remodel\Construction Administration\Shop Drawings\Mechanical Shop Drawings\Shop Drawings Received"
If sFolder <> "" Then
Set Folder = fso.GetFolder(sFolder)
Set Files = Folder.Files
cnt = 10
For Each File In Files
If File.Type = "Adobe Acrobat Document" Then
Cells(cnt, "B").Value = File.Name
cnt = cnt + 1
End If
Next File
End If ' sFolder <> ""
If sFolder <> "" Then
End Sub
Now what I am searching for is code to create a hyperlink in column "E" of the spreadsheet for each file that lists in Column "B" from the process file code above.
Also in Column "D" can it insert the file creation date for each file?
Sub ProcessFiles()
Dim fso As Object
Dim i As Long
Dim sFolder As String
Dim Folder As Object
Dim File As Object
Dim Files As Object
Dim cnt As Long
Set fso = CreateObject("Scripting.FileSystemObject")
sFolder = "Q:\06009 Fayette Memorial Hospital - Heart Center Remodel\Construction Administration\Shop Drawings\Mechanical Shop Drawings\Shop Drawings Received"
If sFolder <> "" Then
Set Folder = fso.GetFolder(sFolder)
Set Files = Folder.Files
cnt = 10
For Each File In Files
If File.Type = "Adobe Acrobat Document" Then
Cells(cnt, "B").Value = File.Name
cnt = cnt + 1
End If
Next File
End If ' sFolder <> ""
If sFolder <> "" Then
End Sub
Now what I am searching for is code to create a hyperlink in column "E" of the spreadsheet for each file that lists in Column "B" from the process file code above.
Also in Column "D" can it insert the file creation date for each file?