WPS 加载项开发 > 文字 API 参考 > Document > 方法 > Document.DeleteAllCommentsShown 方法
删除显示在屏幕上的指定文档的所有修订。

语法

表达式.DeleteAllCommentsShown

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

示例

本示例隐藏“Jeff Smith”所做的所有备注,并删除显示的其他备注。

示例代码
function HideDeleteComments(){
    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
									
    //Delete all comments displayed in the active view
    ActiveDocument.DeleteAllCommentsShown()
}


请参阅