【问题标题】:In the Outlook object model is there a way to see which "view" outlook is in?在 Outlook 对象模型中,有没有办法查看 Outlook 所在的“视图”?
【发布时间】:2020-06-24 05:20:01
【问题描述】:
Outlook 显示的项目类别如何,如窗口左下角突出显示的图标所示,如果下面的图像是电子邮件。我想要一种无论选择哪个文件夹或日历都有效的方法,因为用户可能有多个。到目前为止,我最接近的是检查
Application.ActiveExplorer.CurrentFolder 并检查 DefaultMessageClass 属性。
有没有更直接的方法来确定用户在下面显示的图标菜单中选择了什么?
【问题讨论】:
标签:
vba
outlook
office-interop
【解决方案1】:
Sub NavigationPaneModuleName()
Dim objPane As NavigationPane
Dim objModule As Object
' Get the current NavigationPane object.
Set objPane = ActiveExplorer.NavigationPane
Debug.Print objPane.CurrentModule.Name
EndRoutine:
Set objModule = Nothing
Set objPane = Nothing
End Sub