1、PermissionV11方法Permission InterfaceUse thePermissionobject to restrict permissions to the active document and to return or set specific permissions settings.Namespace:Microsoft.Office.CoreAssembly:office (in office.dll)UsageVB用法Public Class ermissionImplementation Implements PermissionEnd ClassDim e
2、rmissionImplementation1 As New ermissionImplementation()SyntaxVB声明Public Interface Permission Inherits _IMsoDispObj, IEnumerableJ#public interface Permission implements _IMsoDispObj, IEnumerableJScriptpublic interface Permission implements _IMsoDispObj, , IEnumerableRemarksThePermissionproperty of t
3、he Microsoft Office Word 2003Documentobject, the Microsoft Office Excel 2003Workbookobject, and the Microsoft Office PowerPoint 2003Presentationobject returns aPermissionobject.Use theEnabledproperty to determine whether permissions are restricted on the active document. Use theCountproperty to retu
4、rn the number of users with permissions and theRemoveAllmethod to reset all existing permissions.TheDocumentAuthor,EnableTrustedBrowser,RequestPermissionURL, andStoreLicensesproperties provide additional information about permissions settings.ThePermissionobject gives access to a collection ofUserPe
5、rmissionobjects. Use theUserPermissionobject to associate specific sets of rights with individual users. While some permissions granted through the user interface (such asmsoPermissionPrint) apply to all users, you can use theUserPermissionobject to assign them on a per-user basis with per-user expi
6、ration dates.Microsoft Office Information Rights Management supports the use of administrative permission policies which list users and groups and their document permissions. Use theApplyPolicymethod to apply a permission policy and thePermissionFromPolicy,PolicyName, andPolicyDescriptionproperties
7、to return policy information.ThePermissionobject model is available regardless of whether permissions are restricted on the active document. ThePermissionproperty of theDocument,Workbook, andPresentationobjects does not returnNothingwhen the active document does not have restricted permissions. Use
8、theEnabledproperty to determine whether a document has restricted permissions.Use of thePermissionobject raises an error when the Windows Rights Management client is not installed.PlatformsDevelopment PlatformsWindows XP Home Edition, Windows XP Professional, Windows Server 2003, and Windows 2000Tar
9、get PlatformsPermission Members此主题尚未评级-评价此主题Use thePermissionobject to restrict permissions to the active document and to return or set specific permissions settings.The following tables list the members exposed by thePermissiontype.Public PropertiesNameDescriptionApplicationReturns anApplicationobj
10、ect that represents the container application for the object.CountReturns anIntegerindicating the number of items in the specified collection.CreatorReturns a 32-bit integer that indicates the application in which the specified object was created.DocumentAuthorReturns or sets the name in email form
11、of the author of the active document.EnabledReturns or sets aBooleanvalue that indicates whether permissions are enabled on the active document.EnableTrustedBrowserReturns or sets the option that allows a user to view a document with restricted permissions in a web browser if the user does not have
12、the appropriate client application installed.ItemReturns aUserPermissionobject that is a member of thePermissioncollection.ParentReturns theParentobject for the specified object.PermissionFromPolicyReturns aBooleanvalue that indicates whether a permission policy has been applied to the active docume
13、nt.PolicyDescriptionReturns the description of the permissions policy applied to the active document.PolicyNameReturns the name of the permissions policy applied to the active document.RequestPermissionURLReturns or sets the file or web site URL to visit or the email address to contact for users who
14、 need additional permissions on the active document.StoreLicensesReturns aBooleanvalue that indicates whether the users license to view the active document should be cached to allow offline viewing when the user cannot connect to a rights management server.TopPublic MethodsNameDescriptionAddCreates
15、a new set of permissions on the active document for the specified user.ApplyPolicyApplies the specified permission policy to the active document.GetEnumeratorReturns an enumerator to support iterating through the collection.RemoveAllRemoves allUserPermissionobjects from thePermissioncollection of th
16、e active document and disables restrictions on the active document.Permission.Application Property此主题尚未评级-评价此主题Returns anApplicationobject that represents the container application for the object.Namespace:Microsoft.Office.CoreAssembly:office (in office.dll)UsageVB用法Dim permission1 As PermissionDim
17、returnValue As ObjectreturnValue = permission1.ApplicationSyntaxC#C+VB声明ReadOnly Property Application() As ObjectJ#public System.Object get_Application();JScriptfunction get Application() : Object;Thread SafetyAny public static (Shared in Visual Basic) members of this type are thread safe. Any insta
18、nce members are not guaranteed to be thread safe.PlatformsDevelopment PlatformsWindows XP Home Edition, Windows XP Professional, Windows Server 2003, and Windows 2000Target PlatformsPermission.Count Property此主题尚未评级-评价此主题Returns anIntegerindicating the number of items in the specified collection.Name
19、space:Microsoft.Office.CoreAssembly:office (in office.dll)UsageVB用法Dim permission1 As PermissionDim returnValue As IntegerreturnValue = permission1.CountSyntaxC#C+VB声明ReadOnly Property Count() As IntegerJ#public int get_Count();JScriptfunction get Count() : int;RemarksReturns 0 (zero) if permissions
20、 are not enabled on the active document. When permissions are enabled, theCountproperty always returns at least 1, representing the permissions of the document author.Thread SafetyAny public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed
21、 to be thread safe.PlatformsDevelopment PlatformsWindows XP Home Edition, Windows XP Professional, Windows Server 2003, and Windows 2000Target PlatformsPermission.Creator Property此主题尚未评级-评价此主题Returns a 32-bit integer that indicates the application in which the specified object was created.Namespace:
22、Microsoft.Office.CoreAssembly:office (in office.dll)UsageVB用法Dim permission1 As PermissionDim returnValue As IntegerreturnValue = permission1.CreatorSyntaxC#C+VB声明ReadOnly Property Creator() As IntegerJ#public int get_Creator();JScriptfunction get Creator() : int;RemarksIf the specified object was c
23、reated in Microsoft Word, this property returns 1297307460, which represents the string MSWD; if created in Microsoft Excel, this property returns 1480803660. This value can also be represented by the constantwdCreatorCodein Word, orxlCreatorCodein Excel.TheCreatorproperty was primarily designed to
24、be used on the Macintosh, where each application has a four-character creator code. For example, Microsoft Word has the creator code MSWD. For additional information about this property, consult the language reference Help included with Microsoft Office Macintosh Edition.TheCreatorproperty always re
25、turns the numeric identifier for the active application, just as theApplicationproperty always returns the name of the active application in string form. Use theCreatedByproperty of theSharedWorkspaceFile,SharedWorkspaceFolder,SharedWorkspaceLink, andSharedWorkspaceTaskobjects to return the name of
26、the individual who created those objects. Use document properties to return information about the authors of Office documents.Thread SafetyAny public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.PlatformsDevelopment P
27、latformsWindows XP Home Edition, Windows XP Professional, Windows Server 2003, and Windows 2000Target PlatformsPermission.DocumentAuthor Property此主题尚未评级-评价此主题Returns or sets the name in email form of the author of the active document.Namespace:Microsoft.Office.CoreAssembly:office (in office.dll)Usag
28、eVB用法Dim permission1 As PermissionDim returnValue As StringreturnValue = permission1.DocumentAuthorDim sampleValue As Stringpermission1.DocumentAuthor = sampleValueSyntaxC#C+VB声明Property DocumentAuthor() As StringJ#public System.String get_DocumentAuthor();public void set_DocumentAuthor(System.Strin
29、g);JScriptfunction get DocumentAuthor() : String;function set DocumentAuthor(String);RemarksTheDocumentAuthorproperty returns or sets the author of the active document. The author always has non-expiring owner rights to the document, whether owner permission is granted explicitly (through aUserPermi
30、ssionobject) or not.TheDocumentAuthorproperty can only be changed to a different account that has been certified through the permissions user interface to open restricted content on the local machine. In most cases, users who have a single Windows account can only choose between their Windows and th
31、eir Passport identities.If the users Microsoft Windows and Passport identities use the same email address, use the formatpassport:someoneto specify the Passport identity as theDocumentAuthorproperty.Thread SafetyAny public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.PlatformsDevelopment PlatformsWindow
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1