Table of contents
TOC
折叠目录
展开目录

Page.ExportEmailHTML 方法 (发布服务器)Page.ExportEmailHTML Method (Publisher)

office 365 dev account|上次更新日期: 2018/3/13
|
3 参与人员

将出版物的活动页导出为 HTML 文件。Exports the active page of the publication as an HTML file.

语法Syntax

表达式ExportEmailHTML(文件名)expression. ExportEmailHTML( Filename)

_expression_A 变量表示一个Page对象。_expression_A variable that represents a Page object.

参数Parameters

名称Name必需/可选Required/Optional数据类型Data Type说明Description
文件名Filename必需RequiredStringString要向其导出 HTML 的文件的名称。The name of the file to which to export the HTML.

注解Remarks

如果指定了现有的 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.

示例Example

下面的示例设置为活动的页面,文档中的第一页,并将该页面导出到文件。(请注意,必须为此示例正常运行有效的文件路径替换 PathToFile)。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