Document.Compare Method
Displays revision marks that indicate where the document differs from another document.
Namespace: Microsoft.Office.Tools.Word
Assemblies: Microsoft.Office.Tools.Word.v4.0.Utilities (in Microsoft.Office.Tools.Word.v4.0.Utilities.dll)
Microsoft.Office.Tools.Word (in Microsoft.Office.Tools.Word.dll)
Syntax
'Declaration
Sub Compare ( _
Name As String, _
ByRef AuthorName As Object, _
ByRef CompareTarget As Object, _
ByRef DetectFormatChanges As Object, _
ByRef IgnoreAllComparisonWarnings As Object, _
ByRef AddToRecentFiles As Object, _
ByRef RemovePersonalInformation As Object, _
ByRef RemoveDateAndTime As Object _
)
void Compare(
string Name,
ref Object AuthorName,
ref Object CompareTarget,
ref Object DetectFormatChanges,
ref Object IgnoreAllComparisonWarnings,
ref Object AddToRecentFiles,
ref Object RemovePersonalInformation,
ref Object RemoveDateAndTime
)
Parameters
Name
Type: System.StringThe name of the document with which the document is compared.
AuthorName
Type: System.Object%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
Type: System.Object%The target document for the comparison. Can be any WdCompareTarget value.
DetectFormatChanges
Type: System.Object%true (default) for the comparison to include detection of format changes.
IgnoreAllComparisonWarnings
Type: System.Object%true compares the documents without notifying a user of problems. The default value is false.
AddToRecentFiles
Type: System.Object%true adds the document to the list of recently used files on the File menu.
RemovePersonalInformation
Type: System.Object%true if personal information should be removed from the specified document. The default value is false.
RemoveDateAndTime
Type: System.Object%true removes date and time stamp information from tracked changes; false does not remove date and time stamp information from tracked changes.
Remarks
Optional Parameters
For information on optional parameters, see Optional Parameters in Office Solutions.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.