將代表新出版物的新 Document 物件新增至 Documents 集合。
語法
運算式。新增 (PbWizard、 desid)
運算式 傳回 Documents 物件的運算式。
參數
| 名稱 | 必要/選用 | 資料類型 | 描述 |
|---|---|---|---|
| PbWizard | 選用 | PbWizard | 用來建立新出版物的精靈。 可以是 PbWizard 常數。 |
| desid | 選用 | Long | 套用至新出版物的設計 ID。 |
傳回值
Document
註解
desid 參數值應該是要套用的設計識別碼。 您可以建立新的出版物,並在 Publisher 使用者介面中使用所需的精靈和設計,然後執行下列 Visual Basic for Applications (VBA) 巨集來決定設計識別碼。
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 支援與意見反應。