Distributing incoming mail among users

Status
Not open for further replies.
S

Sam

My organization receives a lot of mails, which I then have to forward to a

team responsible for attending to the query at the earliest. The logic to

follow is - 1st mail goes to user 1, 2nd to user 2 and so on, continuing in

cycle.

Currently I have a person to do this manually. I would like to know how this

can be automated using VBA, such that any new mail gets assigned

automatically.
 

Michael Bauer

Senior Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
This easy aproach might work - at least in theory: Put all of the users'

address in an array, so v(0) is the first recipient, v(1) the second, etc.

Use a variable on the module level to count the number of received emails in

the session. In the ItemAdd event of your inbox send the next email to

v(counter), then increase the counter by 1. If the counter is higher than

Ubound(v), set it back to 0.

This works only as long as Outlook is running, and it doesn't know for

whether user 1 for example is on vacation.

Best regards

Michael Bauer

Am Mon, 3 Aug 2009 20:47:01 -0700 schrieb Sam:


> My organization receives a lot of mails, which I then have to forward to a
> team responsible for attending to the query at the earliest. The logic to
> follow is - 1st mail goes to user 1, 2nd to user 2 and so on, continuing


in
> cycle.

> Currently I have a person to do this manually. I would like to know how


this
> can be automated using VBA, such that any new mail gets assigned
> automatically.
 
S

Sam

Mike,

First of all, thank you for responding to my query. The workflow suggested

by you sounds perfect to me. However, as I am only an intermediate level VBA

programmer with no past life in Outlook VBA - I am hoping to learn see some

code which I can use. Hopefully this will allow me to play with Outlook

objects / code, and I would be able to implement it for my organization.

Thanks,

Sam

"Michael Bauer " wrote:



> This easy aproach might work - at least in theory: Put all of the users'
> address in an array, so v(0) is the first recipient, v(1) the second, etc.

> Use a variable on the module level to count the number of received emails in
> the session. In the ItemAdd event of your inbox send the next email to
> v(counter), then increase the counter by 1. If the counter is higher than
> Ubound(v), set it back to 0.

> This works only as long as Outlook is running, and it doesn't know for
> whether user 1 for example is on vacation.

> > Best regards
> Michael Bauer

> > >

> Am Mon, 3 Aug 2009 20:47:01 -0700 schrieb Sam:
>
> > My organization receives a lot of mails, which I then have to forward to a
> > team responsible for attending to the query at the earliest. The logic to
> > follow is - 1st mail goes to user 1, 2nd to user 2 and so on, continuing

> in
> > cycle.
> > Currently I have a person to do this manually. I would like to know how

> this
> > can be automated using VBA, such that any new mail gets assigned
> > automatically.

>
 

Michael Bauer

Senior Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
Please start playing, the object browser helps you to learn the Outlook

object model: Press f2, switch from <All libraries> to Outlook, and see

what's available. For instance, find and select the ItemAdd event, the press

f1 for help.

Best regards

Michael Bauer

Am Tue, 4 Aug 2009 11:39:01 -0700 schrieb Sam:


> Mike,

> First of all, thank you for responding to my query. The workflow suggested
> by you sounds perfect to me. However, as I am only an intermediate level


VBA
> programmer with no past life in Outlook VBA - I am hoping to learn see


some
> code which I can use. Hopefully this will allow me to play with Outlook
> objects / code, and I would be able to implement it for my organization.

> Thanks,
> Sam

> "Michael Bauer " wrote:
>
>

>
>> This easy aproach might work - at least in theory: Put all of the users'
> > address in an array, so v(0) is the first recipient, v(1) the second,


etc.
>

>> Use a variable on the module level to count the number of received emails


in
> > the session. In the ItemAdd event of your inbox send the next email to
> > v(counter), then increase the counter by 1. If the counter is higher than
> > Ubound(v), set it back to 0.
>

>> This works only as long as Outlook is running, and it doesn't know for
> > whether user 1 for example is on vacation.
>

>> > > Best regards
> > Michael Bauer
>

>> >> >>

>

>
>> Am Mon, 3 Aug 2009 20:47:01 -0700 schrieb Sam:
> >
> >> My organization receives a lot of mails, which I then have to forward to


a
> >> team responsible for attending to the query at the earliest. The logic


to
> >> follow is - 1st mail goes to user 1, 2nd to user 2 and so on, continuing

> > in
> >> cycle.
> >
>>> Currently I have a person to do this manually. I would like to know how

> > this
> >> can be automated using VBA, such that any new mail gets assigned
> >> automatically.

> >
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
R copying a custom view from a public folder and distributing programatically Outlook VBA and Custom Forms 3
Aussie Outlook 365 Rule runs manually but returns the error code "an unexpected error has occurred" when incoming mail arrives Using Outlook 0
F Forward incoming email with 4 embedded images in the body without original sender Outlook VBA and Custom Forms 22
R Auto Assign Category colours to Incoming Emails based on whom the email is addressed Outlook VBA and Custom Forms 3
Aussie Rules Run a Script on an Incoming Email OK and then the Email reverts Outlook VBA and Custom Forms 0
C Macro to extract sender name & subject line of incoming emails to single txt file Outlook VBA and Custom Forms 3
e_a_g_l_e_p_i Is it possible it set the fonts used to read incoming mail Using Outlook 25
oliv- How to distinguish whether mail is incoming or outgoing? Outlook VBA and Custom Forms 2
T Search for incoming e-mails for a specified time range Using Outlook 1
G Detect Google Drive and OneDrive links in incoming mail Outlook VBA and Custom Forms 3
D Outlook 2016 customization of incoming messages Using Outlook 1
T Incoming Mail Changes Fonts Using Outlook 0
R VBA to manage incoming mail Outlook VBA and Custom Forms 2
I Capture incoming emails Outlook VBA and Custom Forms 1
S Changing notification sound for new incoming messages in Outlook 365/2016 Using Outlook 1
D VBA to edit body of incoming email and forwarding it Outlook VBA and Custom Forms 11
P Use VBA to alert if new incoming email fits criteria Outlook VBA and Custom Forms 0
A Processing Incoming E-mails with Macros Using Outlook 0
D Delete selected text from incoming emails Outlook VBA and Custom Forms 25
Danny2015 how to change incoming mail conversationtopic successfully Outlook VBA and Custom Forms 6
R IMAP & Outlook 2007: incoming messages still going to old Inbox. Using Outlook 3
A Incoming mail not downloading Using Outlook 2
G Rule starting a VB macro against incoming email Outlook VBA and Custom Forms 3
D Setup expire date for incoming mail Outlook VBA and Custom Forms 2
MattC Some fonts the wrong size in incoming emails in Outlook 2007 Using Outlook 6
C Mark all incoming emails as read Outlook VBA and Custom Forms 3
Emerogork How do I set up an "Incoming mail filter" Using Outlook 12
A Gibberish Titles & Attachments @ incoming Outlook 2013 emails Using Outlook 1
K Ask about a simple script about save a incoming mail as file on local PC Outlook VBA and Custom Forms 3
M Best way to identify/designate contacts in incoming emails? Using Outlook 4
J How to sort incoming email that is sent to a different address to my main one? Using Outlook 1
M Incoming invites to my imap account does not sync to outlook.com Using Outlook.com accounts in Outlook 29
S The incoming task is not valid ((when users are accepting a Task) Using Outlook 5
Commodore Unified inbox or incoming messages view Using Outlook 27
P Automatic reply on incoming messages in outlook using VBA(only Specifi person) Using Outlook 14
A Alerts on incoming emails which are not responded since 1 day Using Outlook 1
J Cannot read incoming emails Using Outlook 2
G Modify Subject line of incoming mail where I am in Cc line Using Outlook 1
J Incoming emails going to wrong sub-folder Using Outlook 4
S Rule to Auto-forward/re-direct a specific incoming email to a group via BCC? Using Outlook 1
F How to change all incoming fonts to black? Using Outlook 3
T Unset alerts from incoming email Using Outlook 11
S Outlook incoming mail & color blindness Using Outlook 2
E Creating rules for incoming emails to be forwarded Using Outlook 2
H new incoming email going to CONTACTS folder?!? Using Outlook 2
J Saving Incoming & Outgoing Outlook 2010 Email Locally with IMAP Using Outlook 2
J Why Doesn't some Incoming Gmail Doesn't Appear In Outlook? Using Outlook 9
E Outlook cannot connect to your incoming (POP3) e-mail server/Cannot send mess. Using Outlook 0
B Incoming message lost in reply Using Outlook 2
R moving incoming items to public folder Using Outlook 3

Similar threads

Top