Jennifer,
The following code works on my system. You need to fill in the correct
folder names for your situation.
If you don't know how to get started at all with VBA code, as in how to make
use of this code, write back.
'***** code begins here
Sub CompareAllFiles()
Dim strFolderA As String, strFolderB As String
Dim strFileSpec As String, strFileName As String
Dim objDocA As Word.Document
strFolderA = "C:\test folder\folderA\"
strFolderB = "C:\test folder\folderB\"
strFileSpec = "*.doc"
strFileName = Dir(strFolderA & strFileSpec)
Do While strFileName <> vbNullString
Set objDocA = Documents.Open(strFolderA & strFileName)
objDocA.Compare _
Name:=strFolderB & strFileName, _
CompareTarget:=wdCompareTargetNew
objDocA.Close
strFileName = Dir
Loop
Set objDocA = Nothing
End Sub
' ***** code ends
If you ever need to take advantage of 2007-specific compare features, you
could use this:
'*******
Option Explicit
Sub CompareAllFiles2007()
Dim strFolderA As String, strFolderB As String
Dim strFileSpec As String, strFileName As String
Dim objDocA As Word.Document, objDocB As Word.Document
strFolderA = "C:\test folder\folderA\"
strFolderB = "C:\test folder\folderB\"
strFileSpec = "*.doc"
strFileName = Dir(strFolderA & strFileSpec)
Do While strFileName <> vbNullString
Set objDocA = Documents.Open(strFolderA & strFileName)
Set objDocB = Documents.Open(strFolderB & strFileName)
Application.CompareDocuments _
OriginalDocument:=objDocA, _
RevisedDocument:=objDocB, _
Destination:=wdCompareDestinationNew
objDocA.Close
objDocB.Close
strFileName = Dir
Loop
Set objDocA = Nothing
Set objDocB = Nothing
End Sub
' *** code ends here
Hope this gets you closer.
Let us know!