共用方式為


WorkbookBase.Permission 屬性

定義

取得 Microsoft.Office.Core.Permission 物件,代表活頁簿中的權限設定。

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

屬性值

代表活頁簿中許可權設定的 Microsoft.Office.Core.Permission 物件。

範例

如果目前活頁簿上未啟用許可權,下列程式代碼範例會 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

適用於