Created
October 16, 2020 16:57
-
-
Save gioxx/8dfa0529288b2c871eda737470f3cbdd to your computer and use it in GitHub Desktop.
Una macro per scovare in quale cartella si trova un'email.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' Outlook 2016: Find Email Position | |
' ----------------------------------------------------------------------------------------------------------- | |
' Author: Michael Bauer | |
' Modified by: GSolone | |
' Version: 0.1 | |
' Last modified: 14-10-2020 | |
' Credits: http://vboffice.net/en/developers/get-the-message-folder/ | |
' ------------------------------------------------------------------------------------------------------------ | |
' UPDATES: | |
' - | |
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 = "L'email si trova in: " & F.FolderPath & vbCrLf | |
Msg = Msg & "Ti porto alla cartella?" | |
If MsgBox(Msg, vbYesNo) = vbYes Then | |
Set Application.ActiveExplorer.CurrentFolder = F | |
End If | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment