WPS 基础接口 > 文字 API 参考 > Document > 方法 > Document.AcceptAllRevisionsShown 方法
接受显示在屏幕上的指定文档中的所有修订。

语法

表达式.AcceptAllRevisionsShown

表达式   必选。一个代表 Document 对象的变量。

说明

可用 RejectAllRevisionsShown 方法来拒绝显示在屏幕上的指定文档中的所有修订。

示例

本示例在隐藏“Jeff Smith”所作修订之后,接受所有显示的修订。本示例假定活动文档有多人审阅过,其中一个审阅者的姓名是“Jeff Smith”。

示例代码
function AcceptAllChanges(){
  let rev
  let rng = ActiveWindow.View
    //Display all comments and revisions
      rng.ShowRevisionsAndComments = true
      rng.ShowFormatChanges = true
      rng.ShowInsertionsAndDeletions = true
								
    for(let i = 1; i <= rng.Reviewers.Count; i++){
        rng.Reviewers.Item(i).Visible = true
    }
								
    //Hide only the revisions/comments made by the
    //reviewer named "Jeff Smith"
      rng.Reviewers.Item("Jeff Smith").Visible = false
    //Accept all revisions displayed in the active view
  ActiveDocument.AcceptAllRevisionsShown()
}


请参阅