Hey everyone,
I have a list of pictures in a folder and i want the urls of the pictures to be inputted into a column. I searched the forums and the closest thing i found was this:
Now i know msofiletypewebpages = what should that be changed to for pictures? Anyway i tried to test this with some html files and when i ran the macro it didnt do anything?
This is exactly what i had:
I have a list of pictures in a folder and i want the urls of the pictures to be inputted into a column. I searched the forums and the closest thing i found was this:
Code:
Dim fs As FileSearch, i As Long
Set fs = Application.FileSearch
With fs
.SearchSubFolders = False
.FileType = msoFileTypeWebPages
.LookIn = "C:\Documents and Settings\sandeepw\Desktop\"
If .Execute > 0 Then
For i = 1 To .FoundFiles.Count
Cells(i + 1, 60) = .FoundFiles(i)
Next i
End If
End With</pre>
Now i know msofiletypewebpages = what should that be changed to for pictures? Anyway i tried to test this with some html files and when i ran the macro it didnt do anything?
This is exactly what i had:
Code:
Sub MyMacro()
Dim fs As FileSearch, i As Long
Set fs = Application.FileSearch
With fs
.SearchSubFolders = False
.FileType = msoFileTypeWebPages
.LookIn = "C:\Documents and Settings\user\Desktop\f\"
If .Execute > 0 Then
For i = 1 To .FoundFiles.Count
Cells(i + 1, 60) = .FoundFiles(i)
Next i
End If
End With
End Sub