Reviewer
API operations for the Reviewer object in text documents.
Reviewers
ActiveDocument.ActiveWindow.View.Reviewers
Returns all reviewers of the document as a collection.
Requires JS-SDK V1.1.10 or later.
-
Syntax
expression.ActiveDocument.ActiveWindow.View.Reviewersexpression: the document type application object.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get all reviewers of the document. const Reviewers = await app.ActiveDocument.ActiveWindow.View.Reviewers; }
Method
ActiveDocument.ActiveWindow.View.Reviewers.Item()
Returns a single reviewer by index or name.
Requires JS-SDK V1.1.10 or later.
-
Syntax
expression.ActiveDocument.ActiveWindow.View.Reviewers.Item(Index)expression: the document type application object.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get all reviewers. const Reviewers = await app.ActiveDocument.ActiveWindow.View.Reviewers; // Get the first reviewer by index (1-based). const reviewer = await Reviewers.Item(1); }
Property
ActiveDocument.ActiveWindow.View.Reviewers.Count
Returns the total number of reviewers in the collection.
Requires JS-SDK V1.1.10 or later.
-
Syntax
expression.ActiveDocument.ActiveWindow.View.Reviewers.Countexpression: the document type application object.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get all reviewers. const Reviewers = await app.ActiveDocument.ActiveWindow.View.Reviewers; // Get the total number of reviewers. const count = await Reviewers.Count; console.log(count); }
Reviewer
Property
ActiveDocument.ActiveWindow.View.Reviewers.Item(Index).Visible
Controls whether a reviewer's revisions and comments are visible. Use this property together with ActiveDocument.AcceptAllRevisionsShown(), ActiveDocument.RejectAllRevisionsShown, and ActiveDocument.DeleteAllCommentsShown to accept, reject, or delete changes from a specific reviewer.
-
Syntax
expression.ActiveDocument.ActiveWindow.View.Reviewers.Item(Index).Visibleexpression: the document type application object.
-
Examples
//@file=base.docx async function example() { await instance.ready(); const app = instance.Application; // Get the first reviewer. const Reviewer = await app.ActiveDocument.ActiveWindow.View.Reviewers.Item(1); // Hide this reviewer's revisions and comments. Reviewer.Visible = false; } -
Accept all revisions by a specific reviewer
//@file=base.docx async function example() { await instance.ready(); const app = instance.Application; // Get the first reviewer. const Reviewer = await app.ActiveDocument.ActiveWindow.View.Reviewers.Item(1); // Show only this reviewer's revisions, then accept them all. Reviewer.Visible = true; await app.ActiveDocument.AcceptAllRevisionsShown(); } -
Reject all revisions by a specific reviewer
//@file=base.docx async function example() { await instance.ready(); const app = instance.Application; // Get the first reviewer. const Reviewer = await app.ActiveDocument.ActiveWindow.View.Reviewers.Item(1); // Show only this reviewer's revisions, then reject them all. Reviewer.Visible = true; await app.ActiveDocument.RejectAllRevisionsShown(); } -
Delete all comments by a specific reviewer
//@file=base.docx async function example() { await instance.ready(); const app = instance.Application; // Get the first reviewer. const Reviewer = await app.ActiveDocument.ActiveWindow.View.Reviewers.Item(1); // Show only this reviewer's comments, then delete them all. Reviewer.Visible = true; await app.ActiveDocument.DeleteAllCommentsShown(); }