WordImporter.Import Method
InfoPath Developer Reference |
Imports the specified Microsoft Office Word 2007 document.
Version Information
Version Added: InfoPath 2007
Syntax
expression.Import(srcPath, destPath, vfShowUI)
expression An expression that returns a WordImporter object.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
srcPath | Required | String | The path to the Office Word 2007 document. |
destPath | Required | String | The path to the folder which will contain the form template files of the converted Office Word 2007 document. |
vfShowUI | Required | Boolean | Shows the user interface while importing. |
Return Value
String
Remarks
If the WordImporter is automated, the
vfShowUI
parameter is ignored.
This interface, object, member or enumeration is provided by the InfoPath design environment. A reference must be set to the Microsoft Office InfoPath Designer 2.0 Type Library, located at C:\Program Files\Microsoft Office\Office12\IPDESIGN.DLL.
This object or member is used for extending the InfoPath application and is not intended to be used directly from your form code.
Example
In the following example, a Office Word 2007 document named "Name.docx" is imported as form template files to the "NewForm" folder in the temp folder on the local drive. This Visual Basic code requires a reference to the Microsoft Office InfoPath Designer 2.0 Type Library (IPDESIGN.DLL) and an Imports XDocsDesigner statement at the top of the form code.
Visual Basic |
---|
|
In the following example, a script is used to convert a Office Word 2007 document named "Name.docx" to form template files in the "NewForm" folder in the temp folder on the local drive.
JScript |
---|
|
See Also