Hi all i am new to this forum, and was hoping someone could assist with a small project
I am trying to find a code to use within excel that will list the file names of word documents within a folder and list all inbuilt properties and custom properties the word documents have
if it could ask me when run what folder to access, and where to store the excel file that would be great, its a lot to ask, i know but was hoping someone could help
A friend with more excel/vb skills than i provided the folloing code to list all file names
Sub GetFileNames()
Dim xRow As Long
Dim xDirect$, xFname$, InitialFoldr$
InitialFoldr$ = "G:\" '<<< Startup folder to begin searching from
With Application.FileDialog(msoFileDialogFolderPicker)
.InitialFileName = Application.DefaultFilePath & "\"
.Title = "Please select a folder to list Files from"
.InitialFileName = InitialFoldr$
.Show
If .SelectedItems.Count <> 0 Then
xDirect$ = .SelectedItems(1) & "\"
xFname$ = Dir(xDirect$, 7)
Do While xFname$ <> ""
ActiveCell.Offset(xRow) = xFname$
xRow = xRow + 1
xFname$ = Dir
Loop
End If
End With
End Sub
the above code works a treat, but if it could be updated to include all the files inbuilt and custom properties it would help immensely
Any and all help would be appreciated
Bookmarks