Checking mailbox emails

Status
Not open for further replies.

thegoat

New Member
Outlook version
Outlook 2010 64 bit
Email Account
Exchange Server
Hi,

We have some code that checks a particular mailbox for emails that were undeliverable. The code works fine and there are no issues.

The problem however is now that some people have the same mailbox 'name' listed twice in Outlook. The mailboxes are different and have different aliases, however when you view them in Outlook they have the same name. This poses a problem when we search for emails that were undeliverable because we use this code to navigate to the mailbox/folder we want:

Set olns = ol.GetNamespace("MAPI")
Set cf = olns.Folders("MailboxName").Folders("Inbox")

So if the user has two mailboxes listed, the code will only use the first mailbox in the list, which may not be the correct one.

Is there another check we can do to make sure they're using the 'correct' mailbox/folder. Eg, somehow check for the alias?

Cheers!
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
L Checking Sender Email Address for trusted domain from list on intranet Outlook VBA and Custom Forms 4
V Checking for empty field Outlook VBA and Custom Forms 2
S Problem Checking the available stores in my Inbox (Outlook VBA) Outlook VBA and Custom Forms 0
M Account sequence when checking mail Using Outlook 6
B Auto name checking upon Tab or Click off To field(s) Using Outlook 19
S Checking attachment is passward protected or not before sending the mail Using Outlook 1
S Outlook Macro for checking the mail is sent to outside organization Using Outlook 3
J Checking PST File Keeps Crashing Using Outlook 2
L Script to: Change subject of email after checking body Using Outlook 2
H Redirection checking Exchange Server Administration 10
S Stop mail checking Using Outlook 5
B Too many ' tasks' when checking email Using Outlook 1
B Checking attachments as they arrive Outlook VBA and Custom Forms 1
S Copy Tasks/Reminders from Shared Mailbox to Personal Tasks/Reminders Outlook VBA and Custom Forms 0
P Shortcut Pane - add shortcut to Office365 group mailbox Using Outlook 1
R How to get the Items object of the default mailbox of a specific account in a multiple account Outlook? Outlook VBA and Custom Forms 0
R Assign Categories "Round Robin" style but in a shared mailbox but on specific emails only Outlook VBA and Custom Forms 8
C Your mailbox has been temporarily moved ... Using Outlook 2
P Auto assign shared mailbox Outlook VBA and Custom Forms 1
A VBA macro for 15 second loop in send and received just for 1 specific mailbox Outlook VBA and Custom Forms 1
R VBA for copying sent email to current folder under a shared mailbox Outlook VBA and Custom Forms 17
T How to Export mailbox from Outlook 2019 to MBOX format? Using Outlook 1
F Delete/create/reset Exchange mailbox on Outlook.com Using Outlook.com accounts in Outlook 3
A New email notification on shared mailbox Outlook VBA and Custom Forms 0
N Shared mailbox in cached mode Using Outlook 0
B Vba to monitor time to respond to emails using a shared mailbox Outlook VBA and Custom Forms 5
D Shared Mailbox question Exchange Server Administration 1
F How to show assigned tasks under certain mailbox? Using Outlook 4
S Import contacts to a shared mailbox Outlook VBA and Custom Forms 2
D Delete Emails from Senders in Shared Mailbox Outlook VBA and Custom Forms 1
O Office 365 - Outlook - Password protect your mailbox Using Outlook 7
C Changed By field not displaying individual user's name in O365 Shared Mailbox Using Outlook 9
D Move Emails between Folders in Separate Mailbox Outlook VBA and Custom Forms 12
M other user's mailbox won't open, forms disappeared Using Outlook 42
M Mailbox Size Outlook.com or Outlook 2011 Using Outlook 1
K Lost Rules. Assistant accesses my mailbox. Disappeared Using Outlook 0
S Recovering permanently deleted folder from shared mailbox Using Outlook 1
J Outlook - 2013 - Error msg when copying folders from Online Archives to another user's mailbox Using Outlook 0
Q VBA Script to move item in secondary mailbox Outlook VBA and Custom Forms 2
I Application_NewMailEx for shared mailbox Outlook VBA and Custom Forms 1
Diane Poremsky Monitor secondary mailbox folder for new messages Using Outlook 0
Mark White vba to create a shared mailbox folder Outlook VBA and Custom Forms 3
D VBA macro printing attachments in shared mailbox Outlook VBA and Custom Forms 1
oliv- Treat once an email with the ItemAdd event in a shared mailbox Outlook VBA and Custom Forms 2
K VBA to measure response time for each emails in a shared mailbox Outlook VBA and Custom Forms 11
M Upgrade in Progress. Your mailbox is currently being optimized as part of upgrade to Outlook 2010 Using Outlook 9
S Shared Mailbox Alert Outlook VBA and Custom Forms 7
O VBA rule on multiple computers using shared mailbox Outlook VBA and Custom Forms 1
P Migrate Office 365 mailbox to a different on-premises domain Using Outlook 1
F Room Mailbox Reply Exchange Server Administration 0

Similar threads

Top