📄 connect.dsr
字号:
VERSION 5.00
Begin {AC0714F6-3D04-11D1-AE7D-00A0C90F26F4} Connect
ClientHeight = 6465
ClientLeft = 0
ClientTop = 0
ClientWidth = 6180
_ExtentX = 10901
_ExtentY = 11404
_Version = 393216
Description = "OutlookEvents"
DisplayName = "OutlookEvents"
AppName = "Microsoft Outlook"
AppVer = "Microsoft Outlook 9.0"
LoadName = "Startup"
LoadBehavior = 3
RegLocation = "HKEY_CURRENT_USER\Software\Microsoft\Office\Outlook"
End
Attribute VB_Name = "Connect"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Option Explicit
'*********************************************************************
' copyright 2002 by Martin Nemzow (mnemzow@networkperf.com)
' You can use this code freely and distribute it.
' No warrantee granted or implied.
' this is a very loose modification of Randy Byrne's CBITEMS OUTLOOK
' COM Add-In in order to trap inspector events along side explorer events
' and watch the sequence of the events. The debugger works with it.
'
'... yes you can use this to add CommandBar items. But note that I have
' changed some variable names and added new classes with longer names
' so that it cuold be debugged and make some sense for reading to me.
' You are welcome to correct anything you want and tell me.
' the comments with '[2002] remove functionality available only in
' OUTLOOK 2002 and in OUTLOOK 2000. I appreciate everyone's efforts to
' decode how to automate Outlook, so if you have comments and changes
' I would very much appreciate it, and I think others will too.
'*********************************************************************
'*********************************************************************
'IDTExtensibility2 is the interface that COM Add-Ins must implement.
'The project references the following object libraries:
'Add additional object libraries as required for your COM Add-in.
'References:
'Microsoft Add-In Designer
'Microsoft Outlook 9.0 object library
'Microsoft Office 9.0 object library
'Microsoft Word 9.0 object library
'Microsoft Excel 9.0 object library
'Microsoft PPT 9.0 object library
'Class: Connect
'Purpose: Office 2000 COM Add-in
'Initial Load: Startup
'*********************************************************************
'*********************************************************************
'To debug a COM Add-in, uncomment the Stop line below or place
'a breakpoint in the procedure that you want to debug.
'If the COM Add-in is loaded as a compiled dll, you must
'first unload the COM Add-in using the COM Add-Ins dialog box.
'Place the COM Add-in project in Run mode and then
'use the COM Add-Ins dialog box to reload the COM Add-in.
'Stop
'Don't forget to recomment this line when
'you recompile your debugged add-in
'*********************************************************************
Implements IDTExtensibility2
Private gBaseExplorerClass As New clsOutlookExplorerEvents
Private gBaseInspectorClass As New clsOutlookInspectorEvents
Private Sub IDTExtensibility2_OnAddInsUpdate(custom() As Variant)
'be sure there is at least a comment line here so that event does not vanish
MsgBox "Addin OnAddInsUpdate."
End Sub
Private Sub IDTExtensibility2_OnBeginShutdown(custom() As Variant)
'be sure there is at least a comment line here so that event does not vanish
MsgBox "Addin OnBeginShutdown."
End Sub
Private Sub IDTExtensibility2_OnConnection(ByVal Application As Object, ByVal ConnectMode As AddInDesignerObjects.ext_ConnectMode, ByVal AddInInst As Object, custom() As Variant)
'be sure there is at least a comment line here so that event does not vanish
MsgBox "Addin OnConnection."
AddInInst.object = Me
gBaseExplorerClass.InitHandler Application, AddInInst.ProgId
gBaseInspectorClass.InitHandler Application, AddInInst.ProgId
End Sub
Private Sub IDTExtensibility2_OnDisconnection(ByVal RemoveMode As AddInDesignerObjects.ext_DisconnectMode, custom() As Variant)
'be sure there is at least a comment line here so that event does not vanish
MsgBox "Addin OnDisconnection."
On Error Resume Next
' If RemoveMode = ext_dm_UserClosed Then
' '
' End If
gBaseExplorerClass.UnInitHandler
Set gBaseExplorerClass = Nothing
gBaseInspectorClass.UnInitHandler
Set gBaseInspectorClass = Nothing
End Sub
Private Sub IDTExtensibility2_OnStartupComplete(custom() As Variant)
'be sure there is at least a comment line here so that event does not vanish
MsgBox "Addin OnStartupComplete."
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -