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
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
相关文章推荐
- 错误: Could not edit the data in the folder or database selected. The current version does not support editing (base, consistent, or closed)
- MFC API——》GetCurrentTime ()
- Thread.currentThread().getContextClassLoader() 与 ObjectInstance.class.getClassLoader() 的区别
- 多线程this.getName()和Thread.currentThread().getName()
- Directory.GetCurrentDirectory 方法
- sessionFactory.getCurrent()和sessionFactory.openSession()的区别
- Directory.GetCurrentDirectory和Application.StartupPath的区别
- Spring @Transactional 声明式事务管理 getCurrentSession
- ubuntu open terminal from current folder
- VB中GetCurrentDirectory()获取路径异常
- SSH中使用getCurrentSession()获得session
- How to get current date time in SharePoint Site Time Zone
- openSession 和getCurrentSession的区别
- Hibernate openSession() 和 getCurrentSession的区别 .
- Thread.currentThread().getContextClassLoader()与Test.class.getClassLoader()区别
- GetModuleFileNameA()与GetCurrentDirectoryA()
- Hibernate中的openSession(),getSession() 和 getCurrentSession() 的区别
- GetCurrentImage的MSND说明,暂记
- hibernate获取session的两种方式分别是openSession() 方法和getCurrentSession() 方法。
- hibernate中SessionFactory.opensession()与getcurrentsession()的区别