allowedControl Element

Microsoft Office InfoPath

Show All Show All

allowedControl Element

Specifies the ActiveX controls that are allowed to be instantiated.

Type

xsd:complexType

Child Elements

None.

Attributes

Attribute Type Required Description Possible Values
cabFile xsd:string No Specifies the name of the CAB file. string
clsid xsd:string Yes Specifies the CLSID (COM class ID) of the ActiveX control. string
version xsd:string No Specifies the ActiveX control version number. string

Definition

    <xsd:element name="allowedControl">
  <xsd:complexType>
    <xsd:attribute name="cabFile" type="xsd:string" use="optional"></xsd:attribute>
    <xsd:attribute name="clsid" type="xsd:string" use="required"></xsd:attribute>
    <xsd:attribute name="version" type="xsd:string" use="optional"></xsd:attribute>
  </xsd:complexType>
</xsd:element>

  

Remarks

When the view contains an OBJECT tag, the control will be instantiated only if the CLSID is listed as an allowedControl element in the permissions element. Controls other than those corresponding to the CLSIDs listed in the permissions element are not allowed to be instantiated in the view.

If an ActiveX control listed in the permissions element is not installed (that is, if a CLSID of a control is not registered), or if an earlier version of the control than that version specified in the permissions element is the only version installed, then the required CAB files will be installed. If the CAB files are not included, or if the installation is stopped, the form will not open.

Note  This item is not supported when the Disable Service Pack features option on the Advanced tab of the Options dialog box in InfoPath is selected or when Microsoft Office 2003 Editions Service Pack 1 or later is not installed. Any form defined by a form definition file (.xsf) that includes this item cannot be opened in InfoPath when service pack features are disabled or unavailable.

Example

The following is an example of the allowedControl element:

    <xsf:permissions>
  <xsf:allowedControl
        cabFile="{84F32C01-78D8-4B93-8ED4-106DA70224C2}.cab” 
        clsid="{84F32C01-78D8-4B93-8ED4-106DA70224C2}" 
        version=”1,0,0,1” />
  <xsf:allowedControl
        clsid="{F08DF954-8592-11D1-B16A-00C0F0283630}" />
</xsf:permissions>