DocumentBase.Permission Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a Permission that represents the permission settings for the document.
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 Permission that represents the permission settings for the document.
Examples
The following code example checks if permission is enabled for the document and displays a message that shows the results. To use this example, run it from the ThisDocument
class in a document-level project.
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