Share via


_Document.Compare Method

Displays revision marks that indicate where the specified document differs from another document.

Namespace:  Microsoft.Office.Interop.Word
Assembly:  Microsoft.Office.Interop.Word (in Microsoft.Office.Interop.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 _
)
'Usage
Dim instance As _Document
Dim Name As String
Dim AuthorName As Object
Dim CompareTarget As Object
Dim DetectFormatChanges As Object
Dim IgnoreAllComparisonWarnings As Object
Dim AddToRecentFiles As Object
Dim RemovePersonalInformation As Object
Dim RemoveDateAndTime As Object

instance.Compare(Name, AuthorName, CompareTarget, _
    DetectFormatChanges, IgnoreAllComparisonWarnings, _
    AddToRecentFiles, RemovePersonalInformation, _
    RemoveDateAndTime)
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.String
    Required String. The name of the document with which the specified document is compared.
  • AuthorName
    Type: System.Object%
    Optional 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%
    Optional Object. The target document for the comparison. Can be any WdCompareTarget constant.
  • DetectFormatChanges
    Type: System.Object%
    Optional Boolean. True (default) for the comparison to include detection of format changes.
  • IgnoreAllComparisonWarnings
    Type: System.Object%
    Optional Object. True compares the documents without notifying a user of problems. The default value is False.
  • AddToRecentFiles
    Type: System.Object%
    Optional Object. True adds the document to the list of recently used files on the File menu.
  • RemovePersonalInformation
    Type: System.Object%
    Optional Object. True removes personal information associated with the differences generated by the comparison.
  • RemoveDateAndTime
    Type: System.Object%
    Optional Object. True removes data and time information associated with the differences generated by the comparison.

See Also

Reference

_Document Interface

_Document Members

Microsoft.Office.Interop.Word Namespace