各位大侠:
   我现在正在对OUTLOOK 进行个性化编程,有一个问题一直不解假如收件箱里有五封
邮件,我单击其中一条邮件的时候,让其邮件内容不在下面窗体显示,我怎么样才能捕捉到这个单击的动作,先谢啦!能解决的再加20

解决方案 »

  1.   

    在thisoutlooksession里如下试试Dim myOlApp As New Outlook.Application
    Public WithEvents myOlExp As Outlook.ExplorerPrivate Sub Application_Startup()
     Set myOlExp = myOlApp.ActiveExplorer
    End SubPrivate Sub myOlExp_SelectionChange()
        MsgBox myOlExp.Caption
    End Sub
      

  2.   

    可否再详细点?
    上面的代码都有用,能不能只对收件箱起作用的
    比方说,单击其中一条msgbox它的subject
      

  3.   

    Dim myOlApp As New Outlook.Application
    Public WithEvents myOlExp As Outlook.ExplorerPrivate Sub Application_Startup()
     Set myOlExp = myOlApp.ActiveExplorer
    End SubPrivate Sub myOlExp_SelectionChange()
        If myOlExp.Caption = "收件箱 - Microsoft Outlook" Then
        MsgBox myOlExp.Selection.Item(1)
        End If
        
    End Sub
      

  4.   

    谢谢大家,特别是hhjjhjhj(大头)