关闭当前出版物并在其位置创建一个空白出版物。
语法
表达式。关闭
表达式 表示 Document 对象的变量。
备注
仅在 Microsoft Publisher 的其他实例中打开的文档对象上使用 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 支持和反馈,获取有关如何接收支持和提供反馈的指南。