Below is a Macro that I found to list the File Names of all of the files in a
directory. How can I add File Size and Date to that list?
Thanks for your help!
Kara
Sub FileNames()
Dim MyPath As String
Dim MyName As String
'let user select a path
With Dialogs(wdDialogCopyFile)
If .Display() <> -1 Then Exit Sub
MyPath = .Directory
End With
'strip quotation marks from path
If Len(MyPath) = 0 Then Exit Sub
If Asc(MyPath) = 34 Then
MyPath = Mid$(MyPath, 2, Len(MyPath) - 2)
End If
'get files from the selected path
'and insert them into the doc
MyName = Dir$(MyPath & "*.*")
Do While MyName <> ""
Selection.InsertAfter MyName & vbCr
MyName = Dir
Loop
'collapse the selection
Selection.Collapse wdCollapseEnd
End Sub
Doug Robbins - 06 Oct 2005 20:55 GMT
See the article "Getting access to the Document Properties of a Word file"
at:
http://www.word.mvps.org/FAQs/MacrosVBA/DSOFile.htm

Signature
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
> Below is a Macro that I found to list the File Names of all of the files
> in a
[quoted text clipped - 34 lines]
>
> End Sub