PDA

View Full Version : VBA to count received emails



XopieX20
05-30-2014, 08:36 AM
I know this is already in use, but I cant find it anywhere. I need a VBA code to count the number of emails that a SHARED mailbox on Outlook exchange gets in a day.

So example, if 1 of our email box's gets 100 emails (this date) then I need it to tell me this. I have seen others code, but cant get it to work for mine. Any help, PLEASE????

westconn1
05-30-2014, 02:52 PM
i don't have a shared mailbox
if you set an items collection for that folder with events, you can then count each email that comes that is added in the additem event of the collection, store the value in some persistant location rather than variable, in case of system crash

or alternatively just do a count of messages with todays date, though any deleted or moved will not be counted