New email notification on shared mailbox

Status
Not open for further replies.

AdrianPL

New Member
Outlook version
Outlook on the web
Email Account
POP3
Hello,
I have a question about new email notification in outlook when I use also shared mailbox, as it doesn't work. I see only notifications from my first mailbox and not from the shared one. I know that there are two ways of solving this issue, I can make a rules or do this by macro. I cannot make rules on shared mailbox as I am not administrator so I have to choose a second option. I would like to add macro which show me notification when new email came into shared mailbox. I found such code in internet:

Private WithEvents Items As Outlook.Items

Private Sub Application_Startup()
Dim Ns As Outlook.NameSpace
Set Ns = Application.GetNamespace("MAPI")
Set Items = GetFolderPath("Accounting\Inbox").Items
End Sub
Private Sub Items_ItemAdd(ByVal Item As Object)
On Error Resume Next

MsgBox "new message from " & Item.SenderName & " in shared folder"

End Sub

As I am not skilled in macros at all its to less information for me.
I am using Office 365 and I see 3 tabs in VB in Outlook

Project1
- Microsoft Outlook Objects
>ThisOutlookSession
-Modules
>Module1
-Class Modules
>Class1

I read that to run this macro I should put provided code in ThisOutlookSession.

Q1: Is does mean that I should remove rest of the tabs?

Q2: Should this macro be on my macros list?

Its only possible when I add :
Sub macro()
End Sub
somewhere ( when my macro is called macro )
Please advice should it be added somewhere in code? And on which tab exactly?

Q3: Could someone provide me code when my shared mailbox is calling XYZ, so I will know exactly which part I should update?

Thank you very much in advance.

Kind regards
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
M Email notification on creation of an appointment shared calendar? Outlook VBA and Custom Forms 3
N Using email notification to update calendar events? Outlook VBA and Custom Forms 4
R Notification/alert when an email has been sat in inbox for a set period of time Using Outlook 1
K How to make email notification in Outlook 2013? Using Outlook 1
C [outlook-users] email notification Using Outlook 7
B outlook 2010 - email sound notification Using Outlook 3
F Email notification if notification email fails Using Outlook 1
D How Can I Receive Email Notification On Multiply Accounts in Outlook.docx Using Outlook 2
B Outlook 2007 New email notification works intermittently after adding Exchange 2010 Servers Exchange Server Administration 1
R Need better notification of email receive errors Using Outlook 2
B automate email message on Outlook Calendar notification alerts? Outlook VBA and Custom Forms 1
A Notification for Multiple Email Accounts Outlook VBA and Custom Forms 3
S Outlook email to configure setup for each mail Outlook VBA and Custom Forms 0
S Macro to extract email addresses of recipients in current drafted email and put into clipboard Outlook VBA and Custom Forms 1
A Is there an ID field you can use to pair a reply to the sent email? Outlook VBA and Custom Forms 4
C Auto Run VBA Code on new email Outlook VBA and Custom Forms 1
M How create a Rule to filter sender's email with more that one @ sign Using Outlook 1
A Prepending Email Addrs with "Display Name <email>" Has Stopped Working Using Outlook 0
Bering Forward selected email without the original email appended Outlook VBA and Custom Forms 0
Aussie Rules Run a Script on an Incoming Email OK and then the Email reverts Outlook VBA and Custom Forms 0
W Reply to email Using Outlook 4
F Junk Email does not get added to the Blocked Sender List Using Outlook 4
B disappearing original when attach to email Using Outlook 1
W September 2020 - No Default Email Client message after Office Update Using Outlook 1
glnz O365 - How to combine the Inboxes for four email accounts into a single Inbox Using Outlook 7
glnz O365 - How to send from acct 2 but showing email name from acct 1 as From - alias? Using Outlook 1
S Macro to move “Re:” & “FWD:” email recieved the shared inbox to a subfolder in outlook Outlook VBA and Custom Forms 0
D Move Email with Attachment to Folder Outlook VBA and Custom Forms 3
E Asking user to select multiple options in a list in an email Outlook VBA and Custom Forms 0
K Use VBA to find Sender and Recipient from Microsfot 365 Journaled Email Items Outlook VBA and Custom Forms 3
B Add ComboBox Value to Body of Email Outlook VBA and Custom Forms 1
A Backup Email Accounts On OutLook For Mac 2016 (Microsoft 365 subscription version) Using Outlook 0
F VBA code to dock Styles whenever I write or edit an email Outlook VBA and Custom Forms 0
G Inbox shows old email Using Outlook 3
L Email with correct To address but displaying name of a related person Using Outlook 0
A Two Inboxes, Same Email? Using Outlook 3
B Adding signature to bottom of VBA reply email Outlook VBA and Custom Forms 1
J To delete the draft email Using Outlook 2
B VBScript doesn't run on Recipient Email Outlook VBA and Custom Forms 2
J Autoreply email recieved from specific sender after deleting some text from body. Using Outlook 0
M Outlook 2013 reminder email by using Outlook vba Outlook VBA and Custom Forms 2
D Sending email from Office 365 alias in Outlook Using Outlook 3
S Macro or plug-in to see if specific person was included in this email Outlook VBA and Custom Forms 4
S Body text of Email from invite date/time Outlook VBA and Custom Forms 7
R Outlook 2010 How do you export 2 email Accounts' 2010 Inbox Files to new computer (2019)? Using Outlook 0
R Auto display of new email does not work on non-default account Outlook VBA and Custom Forms 0
J Automatically forward email and apply template Outlook VBA and Custom Forms 0
L Outlook saved email templates Using Outlook 1
B VBA to convert email to task, insert text of email in task notes, and attach copy of original email Outlook VBA and Custom Forms 4
T How can you include Junk Email in Search Results like you can include Deleted Items? Using Outlook 3

Similar threads

Top