http://msdn.microsoft.com/library/en-us/vbaol10/html/olobjdistlistitem.asp
http://msdn.microsoft.com/library/en-us/vbaol10/html/olobjInspectors.asp

Sub GetCurrentFolder()
  Dim myolApp As New Outlook.Application
  Dim myOlExp As Outlook.Explorer
  Set myOlExp = myolApp.ActiveExplorer
  MsgBox myOlExp.CurrentFolder.Name
End Sub


Sub GetSelectedItems()
    Dim myolApp As New Outlook.Application
    Dim myOlExp As Outlook.Explorer
    Dim myOlSel As Outlook.Selection
    Dim MsgTxt As String
    Dim x As Integer
    MsgTxt = "You have selected items from: "
    Set myOlExp = myolApp.ActiveExplorer
    Set myOlSel = myOlExp.Selection
    For x = 1 To myOlSel.Count
        MsgTxt = MsgTxt & myOlSel.Item(x).SenderName & ";"
    Next x
    MsgBox MsgTxt
End Sub

Sub GetInspectors()
    Dim myolApp As New Outlook.Application
    If myolApp.Inspectors.Count > 0 Then
        For x = 1 To myolApp.Inspectors.Count
            Set myItem = Inspectors.Item(x)
            MsgBox myItem.Cation
        Next x
    Else
        MsgBox "There are no inspector windows open."
    End If
End Sub

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-19
  • 2022-12-23
  • 2021-06-13
  • 2021-11-22
  • 2022-02-25
  • 2021-06-25
猜你喜欢
  • 2022-12-23
  • 2021-07-03
  • 2021-10-27
  • 2021-12-12
  • 2021-06-23
  • 2021-12-19
相关资源
相似解决方案