Outlook VBA教程:Outlook COM 加载项模板

以下代码示例提供实现 COM 加载项所需的空事件过程。


Implements IDTExtensibility2
Private Sub IDTExtensibility2_OnAddInsUpdate(custom() As Variant)
' Occurs when the set of connected COM add-ins changes, that is when
' any other add-in is connected or disconnected.
' The custom argument is ignored.
End Sub
Private Sub IDTExtensibility2_OnBeginShutdown(custom() As Variant)
' If the COM add-in is connected, occurs when Outlook begins its
' shutdown routines.
' The custom argument is ignored.
End Sub
Private Sub IDTExtensibility2_OnConnection(ByVal Application As Object, ByVal ConnectMode As AddInDesignerObjects.ext_ConnectMode, ByVal AddInInst As Object, custom() As Variant)
' Occurs when the COM add-in is connected.
' The Application argument is the Outlook Application object.
' The ConnectMode argument specifies how the COM add-in was connected.
' It can be
'     ext_cm_AfterStartup     Add-in was connected after Outlook started,
'                             or the Connect property of the corresponding
'                             COMAddIn object was set to True
'     ext_cm_Startup          Add-in was connected on startup
'     ext_cm_External
'     ext_cm_CommandLine
' The AddInInst argument is the COMAddIn object that refers to the current
'     instance of the add-in itself.
' The custom argument is ignored.
End Sub
Private Sub IDTExtensibility2_OnDisconnection(ByVal RemoveMode As AddInDesignerObjects.ext_DisconnectMode, custom() As Variant)
' Occurs when the COM add-in is disconnected.
' The RemoveMode argument specifies how the COM add-in was disconnected.
' It can be
'     ext_dm_HostShutdown      Add-in was disconnected when Outlook was
'                              closed.
'     ext_dm_UserClosed        Add-in was disconnected when the user
'                              cleared the corresponding check box in the
'                              COM Add-ins dialog box, or the Connect
'                              property of the corresponding COMAddIn
'                              object was set to False.
' The custom argument is ignored.
End Sub
Private Sub IDTExtensibility2_OnStartupComplete(custom() As Variant)
' If the COM add-in connects at startup, occurs when Outlook completes
' its startup routines. This event does not occur if the COM add-in is not
' connected when Outlook loads, even when the user connects the add-in in
' the COM Add-ins dialog box.
' The custom argument is ignored.
End Sub

上页:Outlook VBA教程:Views集合 下页:Outlook VBA教程:对 COM 加载项的支持

Outlook VBA教程:Outlook COM 加载项模板:相关链接

Outlook VBA教程:对 COM 加载项的支持 Outlook VBA教程:对联系人链接的支持
Outlook VBA教程:对自定义属性页的支持 Outlook VBA教程:对文件夹同步的支持
Outlook VBA教程:Outlook 中的 Visual Basic for Applications Outlook VBA教程:Account属性
Outlook VBA教程:Actions属性 Outlook VBA教程:ActualWork属性
Outlook VBA教程:Address属性 Outlook VBA教程:AddressBookName属性
Outlook VBA教程:AddressEntries属性 Outlook VBA教程:AddressEntry属性
Outlook VBA教程:AddressLists属性 Outlook VBA教程:AllDayEvent属性
Outlook VBA教程:AlternateRecipientAllowed属性 Outlook VBA教程:Anniversary属性
Outlook VBA教程:AnswerWizard属性 Outlook VBA教程:AppFolders属性
Outlook VBA教程:Application属性 Outlook VBA教程:AppointmentItem属性
版权所有 © 中山市飞娥软件工作室 证书:粤ICP备09170368号