Document.Compare 方法

顯示修訂標記,指出文件和另一份文件之間的差異。

命名空間:  Microsoft.Office.Tools.Word
組件:   Microsoft.Office.Tools.Word.v4.0.Utilities (在 Microsoft.Office.Tools.Word.v4.0.Utilities.dll 中)
  Microsoft.Office.Tools.Word (在 Microsoft.Office.Tools.Word.dll 中)

語法

'宣告
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
)

參數

  • Name
    型別:System.String
    用來比較文件的文件名稱。
  • AuthorName
    型別:System.Object%
    與差異處 (比較的結果) 相關聯的檢閱者名稱。如果未指定檢閱者,預設值就是已修訂之文件的作者姓名,如果沒有作者的資訊,則預設值為 "Comparison" 字串。
  • DetectFormatChanges
    型別:System.Object%
    true (預設值) 表示比較有併入格式變更偵測。
  • IgnoreAllComparisonWarnings
    型別:System.Object%
    true 會比較文件,但是有問題時不會通知使用者。預設值是 false。
  • AddToRecentFiles
    型別:System.Object%
    若為 true,便會將文件加入至最近使用檔案的清單 (位於 [檔案] 功能表) 中。
  • RemovePersonalInformation
    型別:System.Object%
    如果應該從指定文件中移除個人資訊,則為 true。預設值是 false。
  • RemoveDateAndTime
    型別:System.Object%
    true 表示會從追蹤修訂中移除日期和時間戳記資訊,否則為 false。

備註

選擇性參數

如需選擇性參數的詳細資訊,請參閱Office 方案中的選擇性參數

.NET Framework 安全性

請參閱

參考

Document 介面

Microsoft.Office.Tools.Word 命名空間