DocumentBase.Permission 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取一个表示文档的权限设置的 Permission。
public Microsoft.Office.Core.Permission Permission { get; }
属性值
一个表示文档的权限设置的 Permission。
示例
下面的代码示例检查是否为文档启用了权限,并显示一条显示结果的消息。 若要使用此示例,请在 ThisDocument 文档级项目的类中运行它。
private void DocumentPermission()
{
if (!this.Permission.Enabled)
{
MessageBox.Show("Permissions are not enabled on "
+ "the current document.");
}
}
Private Sub DocumentPermission()
If Not Me.Permission.Enabled Then
MessageBox.Show("Permissions are not enabled on " & "the current document.")
End If
End Sub