WorkbookBase.Permission 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得 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