有没有办法在outlook中的搜索结果中添加一列,显示文件夹路径而不是文件夹名称?如果是,您可以提供一些教程或文档吗?
谢谢
答案 0 :(得分:1)
您可以使用此电子邮件一次收到此信息。
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