Shared mailbox problem

D.Moore

Senior Member
Outlook version
Outlook 2016 64 bit
Email Account
Office 365 Exchange
Operating system::    Windows 11 latest
Outlook version:     Classic Outlook late
Email type or host:    hosted exchange

Good day to you!

May I ask your kind help on a strange problem?
- I am using office 365 with Classic outlook and hosted exchange.
- I have several VBA scripts (most of them thanks to your help in the past)
- I have 6 shared mailboxes.
- It was all working perfectly for years now, but I had to reinstall my PC.
- I moved from win 10 to win 11, but same office 365, same scripts (export/import), same shared mailboxes, same username/passwords, so with other words, I created an exact replica, apart from OS:

2025-03-07 05_39_52-Unread Mail - admin@yyy.hu - Outlook.png


PROBLEM:
- VBA scripts are fail when e.g. want to access shared mailboxes 'Sent Items' folder: Set objFolder = objectNS.GetSharedDefaultFolder(objOwner, olFolderInbox).Parent.Folders("Sent Items")
- And when I manually navigate to shared mailboxes Sent Items folder, INSTEAD of the shared mailbox Sent Items, outlook shows the main mailbox Sent Items folder. Same with Inbox folder.

Super strange, I never ever experience this before. Could you be so kind to help how could I fix this ? I mean fix that Shared Mailboxes folders be their own and not main mail box one?

BIG heartfelt thank you for your time, help and soonest reply!
 
It looks like you've lost your access to the Shared Folders. If you can't navigate to a Shared Folder manually, then neither can your code. If you can fix that, I think your code will work as well.

Just FYI - You don't need to walk down the Shared folders to get to "Sent Item" in your macro. You can go straight to it:
Code:
Set objFolder = objectNS.GetSharedDefaultFolder(objOwner, olFolderSentMail)
 
It looks like you've lost your access to the Shared Folders. If you can't navigate to a Shared Folder manually, then neither can your code. If you can fix that, I think your code will work as well.

Just FYI - You don't need to walk down the Shared folders to get to "Sent Item" in your macro. You can go straight to it:
Code:
Set objFolder = objectNS.GetSharedDefaultFolder(objOwner, olFolderSentMail)

I was able to fix the original problem by disabling and re-enabling Download Shared Mailboxes under accounts settings, so now shared mailboxes shoing their own content, however, VBA still cant access shared mailboxes Sent Items folder. Any other idea why ?
 
You didn't post the code, so I can't see, are you sure that objOwner has been Resolved before trying to access the shared folder?
Code:
 If Not objOwner.Resolve Then Stop
 
Thank you, problem solved. It turned out that provider has some settings issue, what they didnt admit, just fixed, and now suddenly all shared mailbox reachable with VBA code. Many thanks for your time and help!
 
Similar threads
Thread starter Title Forum Replies Date
M Outlook 2016 outlook vba to look into shared mailbox Outlook VBA and Custom Forms 0
S Email Macros to go to a SHARED Outlook mailbox Draft folder...NOT my personal Outlook Draft folder Using Outlook 2
C Outlook 365 Multiple different Signatures on Shared Mailbox Using Outlook 0
S Outlook 365 Shared mailbox contact group member numbers not matching Using Outlook 0
S Copy Tasks/Reminders from Shared Mailbox to Personal Tasks/Reminders 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
P Auto assign shared 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
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
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
C Changed By field not displaying individual user's name in O365 Shared Mailbox Using Outlook 9
S Recovering permanently deleted folder from shared mailbox Using Outlook 1
I Application_NewMailEx for shared mailbox Outlook VBA and Custom Forms 1
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
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
D Shared Mailbox with mail item marked as "private" Using Outlook 0
Diane Poremsky Save Sent Items in Shared Mailbox using an Exchange Server Cmdlet Using Outlook 0
J Automatically Move Old Items from a Shared Mailbox to a .PST on a Network Drive Outlook VBA and Custom Forms 1
Van Fog Get items in search folder for shared mailbox Outlook VBA and Custom Forms 3
I shared mailbox - can i create a rule (vba) for every user? Outlook VBA and Custom Forms 1
Diane Poremsky How to View Shared Subfolders in an Exchange Mailbox Using Outlook 0
R How do I 'Save Copy of Sent Item to Folder' for a Shared Mailbox Outlook VBA and Custom Forms 9
E Searching a Shared Outlook Mailbox from the start menu? Using Outlook 4
T Messages no longer move to quote folder on shared mailbox after user adds -D to folder name Outlook VBA and Custom Forms 1
Jack Farnan ShowCategoriesDialog for a shared mailbox? Outlook VBA and Custom Forms 3
J Calender notifications from a shared generic mailbox. Using Outlook 1
B Create appointment/meeting from shared mailbox Using Outlook 2
E Shared Mailbox - Send Items Using Outlook 1
B quick help with "changed by" field in a shared mailbox?? Using Outlook 3
R View who sent on behalf of a shared mailbox in Outlook sent items Using Outlook 1
N How to know the email sender (windows logon profile) from a Shared Mailbox Using Outlook 2
L Shared Mailbox, 2 Auto Responses Using Outlook 3
D Shared Mailbox Using Outlook 1
H Forward from Shared Mailbox to individual folders Using Outlook 6
J Color categories with shared mailbox Using Outlook 1
C Tracking WHO deleted items in a Shared Mailbox Using Outlook 1
K Prevent meeting requests being sent from a shared calendar in a group mailbox Using Outlook 1
L Editing auto reply email from a shared mailbox? Exchange Server Administration 7
H Moving emails in shared mailbox to personal mailbox Exchange Server Administration 0
J Add categories to Shared Mailbox using VBA Using Outlook 2
D VBA code running on Server? Shared mailbox email routing Using Outlook 3
N Mark or follow up emails in shared mailbox Using Outlook 2

Similar threads

Back
Top