Office.ActiveView enum

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 == "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.