Udostępnij za pośrednictwem


DocumentBase.Permission Property

Gets a Permission that represents the permission settings for the document.

Namespace:  Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word.v4.0.Utilities (in Microsoft.Office.Tools.Word.v4.0.Utilities.dll)

Syntax

'Declaration
Public ReadOnly Property Permission As Permission
    Get
public Permission Permission { get; }

Property Value

Type: Microsoft.Office.Core.Permission
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 Sub DocumentPermission()
    If Not Me.Permission.Enabled Then
        MessageBox.Show("Permissions are not enabled on " & "the current document.")
    End If
End Sub 
private void DocumentPermission()
{
    if (!this.Permission.Enabled)
    {
        MessageBox.Show("Permissions are not enabled on "
            + "the current document.");
    }
}

.NET Framework Security

See Also

Reference

DocumentBase Class

Microsoft.Office.Tools.Word Namespace