Log in

View Full Version : [SLEEPER:] Automatically Move Emails in a Shared Folder to my Personal Inbox



|||E|||
09-09-2019, 05:51 AM
I have a shared inbox that I'm constantly moving emails out of and into my personal inbox. I would like to have any email that arrives in that shared folder to be automatically moved into my local/personal inbox. There doesn't appear to be any rule that will do that and I haven't been able to find any other threads that address this issue. Any help would be much appreciated. Thanks.

|||E|||
11-04-2019, 06:35 AM
Additional details: the emails are arriving in a Group Inbox, then those emails are sorted into different inboxes. Whenever an email is moved to a specific shared folder, I would like it to be automatically moved into my inbox.

Aussiebear
01-18-2025, 04:45 PM
Just guessing here but try this



Sub MoveEmailsFromSharedToPrivate()
Dim objOutlook As Object
Dim objSharedInbox As Object
Dim objPrivateInbox As Object
Dim objEmail As Object
' Create an Outlook Application object
Set objOutlook = CreateObject("Outlook.Application")
' Get the shared Inbox folder
' Replace "Shared Inbox" with the actual name of your shared mailbox
Set objSharedInbox = objOutlook.GetNamespace("MAPI").Folders("Shared Inbox")
' Get your private Inbox folder
Set objPrivateInbox = objOutlook.GetNamespace("MAPI").GetDefaultFolder(olFolderInbox)
' Loop through each email in the shared Inbox
For Each objEmail In objSharedInbox.Items
' Move the email to your private Inbox
objEmail.Move objPrivateInbox
Next objEmail
' Clean up
Set objEmail = Nothing
Set objSharedInbox = Nothing
Set objPrivateInbox = Nothing
Set objOutlook = Nothing
End Sub