Udostępnij za pośrednictwem


Document.Permission Property (2007 System)

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

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

Syntax

'Declaration
<BrowsableAttribute(False)> _
Public ReadOnly Property Permission As Permission
'Usage
Dim instance As Document 
Dim value As Permission 

value = instance.Permission
[BrowsableAttribute(false)]
public Permission Permission { get; }
[BrowsableAttribute(false)]
public:
property Permission^ Permission {
    Permission^ get ();
}
public function get Permission () : Permission

Property Value

Type: 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.

This example is for a document-level customization.

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

Document Class

Document Members

Microsoft.Office.Tools.Word Namespace