View.Export(String, String) Method

Definition

Exports the view to a file of the specified format.

public:
 void Export(System::String ^ bstrURL, System::String ^ bstrFormat);
public void Export (string bstrURL, string bstrFormat);
abstract member Export : string * string -> unit
Public Sub Export (bstrURL As String, bstrFormat As String)

Parameters

bstrURL
String

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

bstrFormat
String

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

Examples

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

thisXDocument.View.<span class="label">Export</span>(@"C:\MyView.mht", "MHT");

Remarks

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

Applies to