Manjeeth Kidiyoor
New member
- Local time
- Today, 11:36
- Joined
- Aug 18, 2016
- Messages
- 3
Hi Team..
I have multiple mailbox access in my Outlook.
The mail which i open and run the macro should give me the Mailbox ID.
The below codes gives me all the Mailbox IDs but i need only one MailID where the mail has been received.
Could someone please help me with this. Thank you so much in advance.
Sub Test()
Dim objSession
Dim objNamespace
Dim objMailbox
Set objSession = Application.Session
Set objNamespace = Application.GetNamespace("MAPI")
For Each objMailbox In objSession.Folders
MsgBox objMailbox.Name
Next
End Sub
I have multiple mailbox access in my Outlook.
The mail which i open and run the macro should give me the Mailbox ID.
The below codes gives me all the Mailbox IDs but i need only one MailID where the mail has been received.
Could someone please help me with this. Thank you so much in advance.
Sub Test()
Dim objSession
Dim objNamespace
Dim objMailbox
Set objSession = Application.Session
Set objNamespace = Application.GetNamespace("MAPI")
For Each objMailbox In objSession.Folders
MsgBox objMailbox.Name
Next
End Sub