InfoPathEditor.Load method
Loads a form file (.xml) into the InfoPathEditor object.
Namespace: Microsoft.Office.Interop.InfoPath
Assembly: Microsoft.Office.Interop.InfoPath (in Microsoft.Office.Interop.InfoPath.dll)
Syntax
'Declaration
Sub Load ( _
bstrURL As String _
)
'Usage
Dim instance As InfoPathEditor
Dim bstrURL As String
instance.Load(bstrURL)
void Load(
string bstrURL
)
Parameters
bstrURL
Type: System.StringThe path or URL to the form file (.xml).
Remarks
The Load method does not allow you to specify a form template file (.xsn). The form file must contain processing instructions (href and name attributes) that reference a valid form template file for the Load method to succeed. If this is not possible, the NewFromSolution method can be used if you have a .xsn file and a suitably structured XML file, but the XML file does not have processing instruction references that specify the .xsn file. Or you can use the LoadFromStream method to load XML from a System.IO.Stream object.
For more information about the InfoPathEditor and the FormControl objects , see the MSDN article Hosting the InfoPath Form Editing Environment in a Custom Windows Form Application and the "The InfoPath Editor Hosted As a Control" section of What's New for InfoPath Developers.