ExportEmailHTML Method
Exports the active page of the publication as an HTML file.
expression.ExportEmailHTML(Filename)
expression Required. An expression that returns one of the objects in the Applies To list.
Filename Required String. The name of the file to which to export the HTML.
Remarks
If the name of an existing HTML file is specified, that file is overwritten.
This method can only be used on the active page of the publication.
Example
The following example sets the first page in the document as the active page, and exports that page to a file. (Note that PathToFile must be replaced with a valid file path for this example to work.)
Sub ExportEmail()
Dim strFilePath As String
strFilePath = "PathToFile"
With ActiveDocument.ActiveView
.ActivePage = ActiveDocument.Pages(1)
.ActivePage.ExportEmailHTML (strFilePath)
End With
End Sub