WorkbookBase.Permission 属性

定义

获取一个 Microsoft.Office.Core.Permission 对象,该对象表示工作簿中的权限设置。

public Microsoft.Office.Core.Permission Permission { get; }

属性值

Permission

一个表示工作簿中的权限设置的Microsoft. 权限对象。

示例

下面的代码示例使用 Permission 属性,以便在当前工作簿上没有启用权限的情况下显示消息。

此示例适用于文档级自定义项。

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

适用于