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

📄 clsinspectorwrapper.cls

📁 Outlook Inspector Explorer Trap Events COM Add-In
💻 CLS
字号:
VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "clsInspectorWrapper"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
'*********************************************************************
' 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.
'*********************************************************************
Option Explicit
'**********************************************
 'Class: clsInspectorWrapper
 '**********************************************
Private gBaseInspectorClass As New clsOutlookInspectorEvents
Private WithEvents m_objInspector As Outlook.Inspector
Attribute m_objInspector.VB_VarHelpID = -1
Private m_nID As Integer
Private Sub Class_Initialize()
    Set m_objInspector = Nothing
End Sub
Private Sub Class_Terminate()
     Set m_objInspector = Nothing
End Sub
Public Property Let Inspector(objInspectorl As Outlook.Inspector)
     Set m_objInspector = objInspectorl
End Property
Public Property Get Inspector() As Outlook.Inspector
     Set Inspector = m_objInspector
End Property
Public Property Let Key(ID As Integer)
     m_nID = ID
End Property
Private Sub m_objInspector_Activate()
     On Error Resume Next
     MsgBox m_objInspector.Caption & " was activated."
End Sub
Private Sub m_objInspector_Close()
     On Error Resume Next
     moduleOutlookInspector.KillInspector m_nID, Me
     MsgBox m_objInspector.Caption & " was closed."
     Set m_objInspector = Nothing
     If gbl_objApplication.Explorers.Count < 1 Then
         gBaseInspectorClass.UnInitHandler
     Else   'workaround check
        MsgBox "Inspector objects still remain in memory and will keep Outlook in memory."
     End If
End Sub

⌨️ 快捷键说明

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