您的位置:首页 > 其它

Outlook - GetCurrent Folder / GetSelectedItems / GetInspectors

2004-02-18 19:32 519 查看
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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: