Word.EditorType enum
Represents the classes of users who can edit authorized portions of a protected (read-only) document.
Remarks
Used by
Examples
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/35-ranges/manage-range-editing-permissions-desktop.yaml
// Grants everyone permission to edit the first paragraph when editing restrictions apply.
await Word.run(async (context) => {
const paragraphRange: Word.Range = context.document.body.paragraphs.getFirst().getRange(Word.RangeLocation.content);
const editors: Word.EditorCollection = paragraphRange.editors;
const editorType: Word.EditorType = Word.EditorType.everyone;
const editor: Word.Editor = editors.addByType(editorType);
await context.sync();
console.log("Granted Everyone permission on the summary. Get editors to verify it.");
});
Fields
| current = "Current" | Represents the current user of the document. |
| editors = "Editors" | Represents the Editors group for documents that use Information Rights Management. |
| everyone = "Everyone" | Represents all users who open a document. |
| owners = "Owners" | Represents the Owners group for documents that use Information Rights Management. |