IInfoPathDataImporter Interface
The interface developers must implement to provide a custom data importer for InfoPath forms.
Namespace: Microsoft.Office.Interop.InfoPath
Assembly: Microsoft.Office.Interop.InfoPath (in microsoft.office.interop.infopath.dll)
Syntax
'Declaration
'Usage
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 Import Form Data on the File menu. The following registry keys and values are required for a custom data importer.
Registry key location |
Value |
Type |
---|---|---|
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\12.0\InfoPath\ |
Data Importers |
Key |
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\12.0\InfoPath\Data Importers\ |
ImporterClass.Class1 |
Key |
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\12.0\InfoPath\Data Importers\ImporterClass.Class1\ |
DefaultLCID |
REG_SZ |
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\12.0\InfoPath\Data Importers\ImporterClass.Class1\ |
LCID |
Key |
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\12.0\InfoPath\Data Importers\ImporterClass.Class1\LCID |
Name |
REG_SZ |
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\12.0\InfoPath\Data Importers\ImporterClass.Class1\LCID |
Description |
REG_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 language, 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.
For more information about programmatically importing data into an InfoPath form, see the InfoPath Developer Portal on the Microsoft Office Developer Center.
See Also
Reference
IInfoPathDataImporter Members
Microsoft.Office.Interop.InfoPath Namespace