Outlook) (OLE 程式設計識別碼
使用 OLE 程式設計識別碼 (有時稱為 ProgID) 來建立 Automation 物件。 下表列出 ActiveX 控制項、Microsoft Office 應用程式和 Microsoft Office Web 元件的 OLE 程式設計識別碼。
Microsoft ExcelGraphMicrosoft OutlookMicrosoft PowerPointMicrosoft Word
ActiveX 控制項
若要建立下表中所列的 ActiveX 控制項,請使用對應的 OLE 程式設計識別碼。
若要建立此 Microsoft Forms 2.0 控制項 | 請使用此識別碼 |
---|---|
CheckBox | Forms.CheckBox.1 |
ComboBox | Forms.ComboBox.1 |
CommandButton | Forms.CommandButton.1 |
圖文框 | Forms.Frame.1 |
影像 | Forms.Image.1 |
Label | Forms.Label.1 |
ListBox | Forms.ListBox.1 |
MultiPage | Forms.MultiPage.1 |
OptionButton | Forms.OptionButton.1 |
ScrollBar | Forms.ScrollBar.1 |
SpinButton | Forms.SpinButton.1 |
TabStrip | Forms.TabStrip.1 |
TextBox | Forms.TextBox.1 |
ToggleButton | Forms.ToggleButton.1 |
Microsoft Access
若要建立下列表格所列出的 Microsoft Access 物件,請使用其中一個對應的 OLE 程式設計識別碼。 如果您使用一個沒有後置版本號碼的識別碼,您可以在巨集執行的機器上,以其中最新的 Access 版本建立物件。
若要建立此物件 | 請使用其中一個識別碼 |
---|---|
應用程式 | Access.Application |
CurrentData | Access.CodeData、Access.CurrentData |
CurrentProject | Access.CodeProject、Access.CurrentProject |
DefaultWebOptions | Access.DefaultWebOptions |
Microsoft Excel
若要建立下列表格所列出的 Microsoft Excel 物件,請使用其中一個對應的 OLE 程式設計識別碼。 如果您使用一個沒有後置版本號碼的識別碼,您可以在巨集執行的機器上,以其中最新的 Excel 版本建立物件。
若要建立此物件 | 請使用其中一個識別碼 | Comments |
---|---|---|
應用程式 | Excel.Application | |
Workbook | Excel.AddIn | |
Workbook | Excel.Chart | 傳回包含兩個工作表的活頁簿;一個是圖表,另一個是它的資料。 此圖表工作表為使用中的工作表。 |
Workbook | Excel.Sheet | 傳回具有一個工作表的活頁簿。 |
Graph
若要建立下表所列的 Graph 物件,請使用其中一個對應的 OLE 程式設計識別碼。 如果您使用一個沒有後置版本號碼的識別碼,您可以在巨集執行的機器上,以其中最新的 Graph 版本建立物件。
若要建立此物件 | 請使用其中一個識別碼 |
---|---|
應用程式 | MSGraph.Application |
Chart | MSGraph.Chart |
Microsoft Outlook
若要建立下列表格所列出的 Microsoft Outlook 物件,請使用其中一個對應的 OLE 程式設計識別碼。 如果您使用一個沒有後置版本號碼的識別碼,您可以在執行巨集的機器上,以其中最新的 Outlook 版本建立物件。
若要建立此物件 | 請使用其中一個識別碼 |
---|---|
Application | Outlook.Application |
若要建立 Outlook 表單專用的 ActiveX 控制項 (如下表所列),請使用對應的 OLE 程式設計識別碼。
若要建立此 Outlook 控制項 | 請使用此識別碼 |
---|---|
OlkBusinessCardControl | Outlook.OlkBusinessCardControl |
OlkCategory | Outlook.OlkCategoryStrip |
OlkCheckBox | Outlook.OlkCheckBox |
OlkComboBox | Outlook.OlkComboBox |
OlkCommandButton | Outlook.OlkCommandButton |
OlkContactPhoto | Outlook.OlkContactPhoto |
OlkDateControl | Outlook.OlkDateControl |
OlkFrameHeader | Outlook.OlkFrameHeader |
OlkInfoBar | Outlook.OlkInfoBar |
OlkLabel | Outlook.OlkLabel |
OlkListBox | Outlook.OlkListBox |
OlkOptionButton | Outlook.OlkOptionButton |
OlkPageControl | Outlook.OlkPageControl |
OlkSenderPhoto | Outlook.OlkSenderPhoto |
OlkTextBox | Outlook.OlkTextBox |
OlkTimeControl | Outlook.OlkTimeControl |
OlkTimeZoneControl | Outlook.OlkTimeZone |
Microsoft PowerPoint
若要建立下列表格所列出的 Microsoft PowerPoint 物件,請使用其中一個對應的 OLE 程式設計識別碼。 如果您使用一個沒有後置版本號碼的識別碼,您可以在巨集執行的機器上,以其中最新的 PowerPoint 版本建立物件。
若要建立此物件 | 請使用其中一個識別碼 |
---|---|
應用程式 | PowerPoint.Application |
Microsoft Word
若要建立下列表格所列出的 Microsoft Word 物件,請使用其中一個對應的 OLE 程式設計識別碼。 如果您使用一個沒有後置版本號碼的識別碼,您可以在巨集執行的機器上,以其中最新的 Word 版本建立物件。
若要建立此物件 | 請使用其中一個識別碼 |
---|---|
應用程式 | Word.Application |
Document | Word.Document、Word.Template |
Global | Word.Global |
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。