有没有办法在 Outlook 的搜索结果中添加一列,显示文件夹路径而不仅仅是文件夹名称?如果是,您能否提供一些教程或文档?
谢谢你
有没有办法在 Outlook 的搜索结果中添加一列,显示文件夹路径而不仅仅是文件夹名称?如果是,您能否提供一些教程或文档?
谢谢你
您可以获得此信息,一次收到一封电子邮件。
http://vboffice.net/sample.html?lang=en&mnu=2&smp=65&cmd=showitem
Public Sub GetItemsFolderPath()
Dim obj As Object
Dim F As Outlook.MAPIFolder
Dim Msg$
Set obj = Application.ActiveWindow
If TypeOf obj Is Outlook.Inspector Then
Set obj = obj.CurrentItem
Else
Set obj = obj.Selection(1)
End If
Set F = obj.Parent
Msg = "The path is: " & F.FolderPath & vbCrLf
Msg = Msg & "Switch to the folder?"
If MsgBox(Msg, vbYesNo) = vbYes Then
Set Application.ActiveExplorer.CurrentFolder = F
End If
End Sub