IInfoPathDataImporterFields.GetControls Method

InfoPath Developer Reference

Gets a collection of IInfoPathViewControl objects for each control in the view.

Version Information
 Version Added:  InfoPath 2007

Syntax

expression.GetControls(ppEnumUnkControls)

expression   An expression that returns an IInfoPathDataImporterFields object.

Parameters

Name Required/Optional Data Type Description
ppEnumUnkControls Required [IENUMUNKNOWN] An mshtml.IEnumUnknown collection of controls in the view.

Return Value
[HRESULT]

Remarks

Use the GetControls method of the IInfoPathDataImporterFields object to return a collection of IInfoPathViewControl objects. Each object in the collection corresponds to a control in the view of the form. Each control has various properties you can evaluate or set, like the read-only DataType and InputScope properties, and the read/write Value property.

Use these properties in conjunction with the data from the import source to import data into an InfoPath form. The following controls in the view are enumerated (if present):

Control Enumerated Value
Text Box PlainText
Rich Text Box RichText
Drop-Down List Box DropDown
Combo Box ComboBox
List Box ListBox
Date Picker DTPicker_DTText
Check Box CheckBox
Option Button OptionButton
Bulleted List ListItem_Plain or ListItem_formatted
Numbered List ListItem_Plain or ListItem_formatted
Plain List ListItem_Plain or ListItem_formatted
Picture InlineImage or LinkedImage
Ink Picture InkPicture
File Attachment FileAttachment

The following controls are not enumerated (excluded from the enumeration):

Control
Section
Optional Section
Repeating Section
Repeating Table
Horizontal Repeating Table
Master/Detail
Expression Box
Vertical Label
Button
Hyperlink
Scrolling Region
Choice Group
Repeating Choice Group
Choice Section
Repeating Recursive Section
Custom Controls (ActiveX)
Multiple-Selection List Box

This object or member is used for extending the InfoPath application and is not intended to be used directly from your form code.

For more information about programmatically importing data into an InfoPath form, see the InfoPath Developer Portal on the Microsoft Office Developer Center.

See Also