View.Export method

Exports the view to a file of the specified format.

Namespace:  Microsoft.Office.Interop.InfoPath
Assembly:  Microsoft.Office.Interop.InfoPath (in Microsoft.Office.Interop.InfoPath.dll)

Syntax

'Declaration
Sub Export ( _
    bstrURL As String, _
    bstrFormat As String _
)
'Usage
Dim instance As View
Dim bstrURL As String
Dim bstrFormat As String

instance.Export(bstrURL, bstrFormat)
void Export(
    string bstrURL,
    string bstrFormat
)

Parameters

  • bstrURL
    Type: System.String

    The directory location that the exported view file will be written to.

  • bstrFormat
    Type: System.String

    The type of file format to export to. Only the "MHT" value is supported.

Remarks

If used in a form that is not fully trusted, the Export method will return a "permission denied" error.

Examples

In the following example, the Export method of the ViewObject object is used to export the current view:

thisXDocument.View.Export(@"C:\MyView.mht", "MHT");

See also

Reference

View interface

View members

Microsoft.Office.Interop.InfoPath namespace