Document.Compare (Word)
Displays revision marks that indicate where the specified document differs from another document.
Compare (Name, AuthorName, CompareTarget, DetectFormatChanges, IgnoreAllComparisonWarnings, AddToRecentFiles, RemovePersonalInformation, RemoveDateAndTime)
Sub CompareDocument()
ActiveDocument.Compare Name:="C:\Draft\FirstRev.doc", _
CompareTarget:=wdCompareTargetNew
End Sub
Arguments
The following argument is required
Name (String) - The name of the document with which the specified document is compared.
Optional arguments
The following arguments are optional
AuthorName (String) - The reviewer name associated with the differences generated by the comparison. If unspecified, the value defaults to the author name of the revised document or the string "Comparison" if no author information is present.
CompareTarget (WdCompareTarget) - The target document for the comparison. Can be any WdCompareTarget constant.
Possible return values are wdCompareTargetCurrent - Places comparison differences in the current document. Default, wdCompareTargetNew - Places comparison differences in a new document, wdCompareTargetSelected - Places comparison differences in the target document.
DetectFormatChanges (Boolean) - True (default) for the comparison to include detection of format changes.
IgnoreAllComparisonWarnings (Boolean) - True compares the documents without notifying a user of problems. The default value is False.
AddToRecentFiles (Boolean) - True adds the document to the list of recently used files on the File menu.
RemovePersonalInformation (Boolean) - True removes all user information from comments, revisions, and the properties dialog box in the returned Document object . The default value is False.
RemoveDateAndTime (Boolean) - True removes date and time stamp information from tracked changes in the returned Document object. The default value is False.