Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Application.CompareDocuments Method

Office 2007
Compares two documents and returns a Document object that represents the document that contains the differences between the two documents, marked using tracked changes.

Syntax

expression.CompareDocuments(OriginalDocument, RevisedDocument, Destination, Granularity, CompareFormatting, CompareCaseChanges, CompareWhitespace, CompareTables, CompareHeaders, CompareFootnotes, CompareTextboxes, CompareFields, CompareComments, RevisedAuthor, IgnoreAllComparisonWarnings)

expression   An expression that returns an Application object.

Parameters

NameRequired/OptionalData TypeDescription
OriginalDocumentRequiredDocumentSpecifies the path and file name of the original document.
RevisedDocumentRequiredDocumentSpecifies the path and file name of the revised document to which to compare the original document.
DestinationOptionalWdCompareDestinationSpecifies whether to create a new file or whether to mark the differences between the two documents in the original document or in the revised document. Default value is wdCompareDestinationNew.
GranularityOptionalWdGranularitySpecifies whether changes are tracked by character or by word. Default value is wdGranularityWordLevel.
CompareFormattingOptionalBooleanSpecifies whether to mark differences in formatting between the two documents. Default value is True.
CompareCaseChangesOptionalBooleanSpecifies whether to mark differences in case between the two documents. Default value is True.
CompareWhitespaceOptionalBooleanSpecifies whether to mark differences in white space, such as paragraphs or spaces, between the two documents. Default value is True.
CompareTablesOptionalBooleanSpecifies whether to compare the differences in data contained in tables between the two documents. Default value is True.
CompareHeadersOptionalBooleanSpecifies whether to compare differences in headers and footers between the two documents. Default value is True.
CompareFootnotesOptionalBooleanSpecifies whether to compare differences in footnotes and endnotes between the two documents. Default value is True.
CompareTextboxesOptionalBooleanSpecifies whether to compare differences in the data contained within text boxes between the two documents. Default value is True.
CompareFieldsOptionalBooleanSpecifies whether to compare differences in fields between the two documents. Default value is True.
CompareCommentsOptionalBooleanSpecifies whether to compare differences in comments between the two documents. Default value is True.
RevisedAuthorOptionalStringSpecifies the name of the person to whom to attribute changes when comparing the two documents.
IgnoreAllComparisonWarningsOptionalBooleanSpecifies whether to ignore warnings when comparing the two documents.

Return Value
Document




Community Additions

Show:
© 2014 Microsoft