Table of contents
Collapse the table of content
Expand the table of content

Page.ExportEmailHTML Method (Publisher)

office 365 dev account|Last Updated: 8/24/2017
3 Contributors

Exports the active page of the publication as an HTML file.


expression. ExportEmailHTML( Filename)

_expression_A variable that represents a Page object.


NameRequired/OptionalData TypeDescription
FilenameRequiredStringThe 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
© 2018 Microsoft