Share via


View2.ExportAsFixedFormat method

Exports the view to a file of the specified format, and supports initializing a COM add-in for exporting to a fixed-format file.

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

Syntax

'Declaration
Sub ExportAsFixedFormat ( _
    bstrURL As String, _
    bstrFormat As String, _
    varExporter As Object _
)
'Usage
Dim instance As View2
Dim bstrURL As String
Dim bstrFormat As String
Dim varExporter As Object

instance.ExportAsFixedFormat(bstrURL, _
    bstrFormat, varExporter)
void ExportAsFixedFormat(
    string bstrURL,
    string bstrFormat,
    Object varExporter
)

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. The supported values are:

    "MHT" - Web Archive, single file format (.mht)

    "PDF" - Portable Document Format file (.pdf)

    "XPS" - XPS Document (.xps)

Remarks

The pUnkExporter parameter is used to provide an IUnknown interface pointer to the active document. This is used to initialize a COM add-in for exporting to a fixed-format file. For more information, see the article "Extending the Office Fixed-Format Export Feature" on Microsoft Developer Network (MSDN).

Note

You can save as a PDF or XPS file from a Microsoft Office system program only after you install an add-in. For more information, search for "Enable support for other file formats, such as PDF and XPS" on Office Online.

See also

Reference

View2 interface

View2 members

Microsoft.Office.Interop.InfoPath namespace