Edit

Share via


Permission.ApplyPolicy(String) Method

Definition

Applies a policy to the form using a policy template file.

public:
 void ApplyPolicy(System::String ^ bstrFileName);
public void ApplyPolicy (string bstrFileName);
abstract member ApplyPolicy : string -> unit
Public Sub ApplyPolicy (bstrFileName As String)

Parameters

bstrFileName
String

The path and file name of an Extensible Rights Markup Language (XRML) file that defines users and groups and permissions to apply to the form template.

Examples

In the following example, the ApplyPolicy method is used to apply a policy template file that allows the user to edit, but not copy the current form.

_XDocument3 thisDoc = (_XDocument3)thisXDocument;
thisDoc.Permission.ApplyPolicy(
   "\\\\MyShare\\Templates\\Edit_but_not_copy.xml");
Dim thisDoc As _XDocument3 = DirectCast(thisXDocument, _XDocument3)
thisDoc.Permission.ApplyPolicy( _
   "\\MyShare\Templates\Edit_but_not_copy.xml")

Remarks

To view an example of the format of an XRML file that is used as a policy template file, see Sample End-User License

Applies to