Sub ProcessAll(sPath As String)
Dim WdDoc As Document, sFile As String
sFile = Dir(sPath & "*.doc")
'Loop through all .doc files in that path
Do While sFile <> ""
Set WdDoc = Application.Documents.Open(sPath & sFile)
'Do something with that Document, insert whatever you want to do here
Debug.Print WdDoc.Name
'You can save it, if you like, here it's not saved
WdDoc.Close wdDoNotSaveChanges
sFile = Dir
Loop
End Sub
|