Share via


View2.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
'Usage

Parameters

  • bstrURL
    The directory location that the exported view file will be written to.
  • bstrFormat
    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.

Example

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

View2 Interface
View2 Members
Microsoft.Office.Interop.InfoPath Namespace