⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 moduleoutlookinspector.bas

📁 Outlook Inspector Explorer Trap Events COM Add-In
💻 BAS
字号:
Attribute VB_Name = "moduleOutlookInspector"
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.
'*********************************************************************

'************************************************************
 'Module: moduleOutlookInspector
 'Purpose: Maintain a collection of Outlook Inspector objects
 '************************************************************
Public gbl_colInspectorWrapper As New Collection
''defined also in moduleOutlookExplorer too so do not need here
''Public gbl_objApplication As Outlook.Application
''Public gbl_ProgID As String

Dim nID As Integer
Public Sub AddInspector(Inspector As Outlook.Inspector)
     Dim objclsInspectorWrapper As New clsInspectorWrapper

     objclsInspectorWrapper.Inspector = Inspector

     objclsInspectorWrapper.Key = nID
     gbl_colInspectorWrapper.Add objclsInspectorWrapper, CStr(nID)
     nID = nID + 1
End Sub
Public Sub KillInspector(ID As Integer, objclsInspectorWrapper As clsInspectorWrapper)
     Dim objclsInspectorWrapper2 As clsInspectorWrapper

     Set objclsInspectorWrapper2 = gbl_colInspectorWrapper.Item(CStr(ID))
     If Not objclsInspectorWrapper2 Is objclsInspectorWrapper Then
         Err.Raise 1, Description:="Unexpected Error in KillInspector"
         Exit Sub
     End If

     gbl_colInspectorWrapper.Remove CStr(ID)
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -