Document.Close 方法 (Publisher)

关闭当前出版物并在其位置创建一个空白出版物。

语法

表达式关闭

表达 一个代表 Document 对象的变量。

备注

仅对另一个 Microsoft Publisher 实例中打开的 Document 对象使用 Close 方法。 试图关闭 Publisher 当前实例中的当前出版物将导致错误。

示例

本示例在 Publisher 的新实例中打开一个发布以供修改,然后关闭该发布。 请注意,若要使此示例有效,必须将 替换为 FileName 有效的文件名。

Sub ModifyAnotherPublication() 
 
 ' Create new instance of Publisher. 
 Dim appPub As New Publisher.Application 
 
 ' Open publication. 
 appPub.Open FileName:="FileName" 
 
 ' Put code here to modify the publication as necessary. 
 
 ' Close the publication. 
 appPub.ActiveDocument.Close 
 
 ' Release the other instance of Publisher. 
 Set appPub = Nothing 
 
End Sub

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。