将表示新发布的新 Document 对象添加到 Documents 集合。
语法
表达式。添加 (PbWizard, desid)
表达式 返回 Documents 对象的表达式。
参数
| 名称 | 必需/可选 | 数据类型 | 说明 |
|---|---|---|---|
| PbWizard | 可选 | PbWizard | 创建新出版物时要使用的向导。 可以是 PbWizard 常量。 |
| desid | 可选 | Long | 应用于新出版物的设计方案的 ID。 |
返回值
文档
备注
desid 参数值应为要应用的设计的 ID。 可以通过在 Publisher 用户界面中创建一个使用所需向导和设计的新出版物,然后运行以下 Visual Basic for Applications (VBA) 宏来确定设计 ID。
Public Sub FindDesignID()
Dim pbWizard As Wizard
Dim pbWizardProperty As WizardProperty
Set pbWizard = ThisDocument.Wizard
Set pbWizardProperty = pbWizard.Properties(1)
Debug.Print pbWizardProperty.CurrentValueId
End Sub
支持和反馈
有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。