Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

Office.ActiveView enum

Package:
office

Specifies the state of the active view of the document, for example, whether the user can edit the document.

Remarks

Examples

// Get whether the current view is edit or read.
Office.context.document.getActiveViewAsync(function (asyncResult) {
 if (asyncResult.status === Office.AsyncResultStatus.Failed) {
 showMessage("Action failed with error: " + asyncResult.error.message);
 } else {
 const activeView : Office.ActiveView = asyncResult.value;
 showMessage("The current view is " + activeView);
 }
});

Fields

Edit

The active view of the Office application lets the user edit the content in the document.

Read

The active view of the Office application only lets the user read the content in the document.


Feedback

Was this page helpful?