Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
ApplyPolicy Method
Collapse the table of content
Expand the table of content

Permission.ApplyPolicy Method (Microsoft.Office.InfoPath)

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

Namespace: Microsoft.Office.InfoPath
Assembly: Microsoft.Office.InfoPath (in microsoft.office.infopath.dll)

public abstract void ApplyPolicy (
	string filename



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.

Exception typeCondition


The parameter passed to this method is null.


The parameter passed to this method isnot valid. For example, it is of the wrong type or format.

To view an example of the format of an XRML file that is used as a policy template file, see Sample End-User License in the Rights Management Services SDK.

This member can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.

This type or member can be accessed only from code running in forms opened in Microsoft Office InfoPath 2007.

In the following example, clicking the Button control applies a policy template file that allows the user to edit, but not copy the current form.

public void CTRL1_Clicked(object sender, ClickedEventArgs e)

Community Additions

© 2015 Microsoft