H
Higgsy
Hi
I have to work with another user's Mailbox so I have this user's
Mailbox in my Outlook.
His Mailbox was added into my Outlook by the usual Tools/email
accounts/view or change existing email accounts/more
settings/advanced/"open these additional mailboxes"
So now I can see both my folders and his folders.
In VBA I'm trying to open a sub- folder of my Mailbox, but the
following code traverses this persons mailbox and not mine. It appears
that the ofRootFolder has been set to his mailbox and not mine
Public Sub zzz()
Dim onMAPI As NameSpace
Dim ofRootFolder As Folders
Dim ofFirstFolder As MAPIFolder
Set onMAPI = Application.GetNamespace("MAPI")
Set ofRootFolder = onMAPI.Folders
Set ofFirstFolder = ofRootFolder.GetFirst
MsgBox (ofFirstFolder.Name)
End Sub
How can I tell the code to traverse my Mailbox and not his?
thanks
Dave
I have to work with another user's Mailbox so I have this user's
Mailbox in my Outlook.
His Mailbox was added into my Outlook by the usual Tools/email
accounts/view or change existing email accounts/more
settings/advanced/"open these additional mailboxes"
So now I can see both my folders and his folders.
In VBA I'm trying to open a sub- folder of my Mailbox, but the
following code traverses this persons mailbox and not mine. It appears
that the ofRootFolder has been set to his mailbox and not mine
Public Sub zzz()
Dim onMAPI As NameSpace
Dim ofRootFolder As Folders
Dim ofFirstFolder As MAPIFolder
Set onMAPI = Application.GetNamespace("MAPI")
Set ofRootFolder = onMAPI.Folders
Set ofFirstFolder = ofRootFolder.GetFirst
MsgBox (ofFirstFolder.Name)
End Sub
How can I tell the code to traverse my Mailbox and not his?
thanks
Dave