Share via


Permission.Enabled Property 

Returns or sets a Boolean value that indicates whether permissions are enabled on the active document.

Namespace: Microsoft.Office.Core
Assembly: office (in office.dll)

Usage

Dim permission1 As Permission

Dim returnValue As Boolean
returnValue = permission1.Enabled

Dim sampleValue As Boolean
permission1.Enabled = sampleValue

Syntax

Property Enabled() As Boolean
bool Enabled {get; set;}
property Boolean Enabled{
    Boolean get();
    Void set(Boolean);
}
public boolean get_Enabled();
public void set_Enabled(boolean);
function get Enabled() : Boolean;
function set Enabled(Boolean);

Remarks

Use the Enabled property to determine whether permissions are restricted on the active document, and to enable or disable permissions. Set Enabled to False to disable permissions and to remove all users, other than the document author, and their permissions.

When permissions are disabled, the Count property of the Permission object returns 0 (zero); however, when permissions are re-enabled, the permissions of the document author remain intact.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, and Windows 2000

Target Platforms

See Also

Reference

Permission Interface
Microsoft.Office.Core Namespace

Other Resources

Permission Members