Page.ExportEmailHTML Method (Publisher)
Exports the active page of the publication as an HTML file.
expression A variable that represents a Page object.
|Filename||Required||String||The name of the file to which to export the HTML.|
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.
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