Share via


WorkbookBase.Permission Property

Definition

Gets a Microsoft.Office.Core.Permission object that represents the permission settings in the workbook.

public:
 property Microsoft::Office::Core::Permission ^ Permission { Microsoft::Office::Core::Permission ^ get(); };
public Microsoft.Office.Core.Permission Permission { get; }
member this.Permission : Microsoft.Office.Core.Permission
Public ReadOnly Property Permission As Permission

Property Value

A Microsoft.Office.Core.Permission object that represents the permission settings in the workbook.

Examples

The following code example uses the Permission property to display a message if permissions are not enabled on the current workbook.

This example is for a document-level customization.

private void DisplayPermission()
{
    if (!this.Permission.Enabled)
    {
        MessageBox.Show("Permissions are not enabled on the current workbook.");
    }
}
Private Sub DisplayPermission()
    If Not Me.Permission.Enabled Then
        MsgBox("Permissions are not enabled on the current workbook.")
    End If
End Sub

Applies to