This documentation is archived and is not being maintained.

IInfoPathDataImporter Interface

Office 2007
The interface developers must implement the IInfoPathDataImporter interface to provide a custom data importer for InfoPath forms.

Version Information
 Version Added:  InfoPath 2007

Remarks

When a custom data importer is registered for use with InfoPath, it is listed on the Import Form Data dialog box, which is accessed by clicking on the File menu, then Import Form Data. The following registry keys and values are required for a custom data importer.

Registry key locationValueType
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\12.0\InfoPath\Data ImportersKey
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\12.0\InfoPath\Data Importers\ImporterClass.Class1Key
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\12.0\InfoPath\Data Importers\ImporterClass.Class1\DefaultLCIDREG_SZ
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\12.0\InfoPath\Data Importers\ImporterClass.Class1\LCIDKey
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\12.0\InfoPath\Data Importers\ImporterClass.Class1\LCIDNameREG_SZ
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\12.0\InfoPath\Data Importers\ImporterClass.Class1\LCIDDescriptionREG_SZ

ImporterClass.Class1 and LCID should be changed to reflect the COM class name and supported LCIDs of your custom data importer.

Each data importer must have a registry key under the Data Importers key, with a value corresponding to the COM class name. Under this key, a string (REG_SZ) value called "DefaultLCID" must be present with a data value of the default Locale ID (LCID), such as "1033" for US English. All languages supported by the data importer, including the default langauge, must have an

LCID key under the COM class name corresponding to the supported LCID. At least one LCID is required, and is the default LCID, but any number of LCID keys can be present depending on the number of locales the custom data importer supports. Each LCID key must contain a string (REG_SZ) value called "Name" and a second but optional string value called "Description" which are shown in the Import Form Data dialog box. If there is no entry for the current language, InfoPath will display the strings provided for the language specified as the DefaultLCID value.

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.




Show: