Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Outlook and VBA (http://www.outlookbanter.com/outlook-vba/)
-   -   Distributing incoming mail among users (http://www.outlookbanter.com/outlook-vba/93351-distributing-incoming-mail-among-users.html)

Sam August 4th 09 04:47 AM

Distributing incoming mail among users
 
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 [MVP - Outlook] August 4th 09 06:57 PM

Distributing incoming mail among users
 


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 - MVP Outlook

: Outlook Categories? Category Manager Is Your Tool
: VBOffice Reporter for Data Analysis & Reporting
: http://www.vboffice.net/product.html?pub=6&lang=en


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.


Sam August 4th 09 07:39 PM

Distributing incoming mail among users
 
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 [MVP - Outlook]" 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 - MVP Outlook

: Outlook Categories? Category Manager Is Your Tool
: VBOffice Reporter for Data Analysis & Reporting
: http://www.vboffice.net/product.html?pub=6&lang=en


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 [MVP - Outlook] August 7th 09 09:56 PM

Distributing incoming mail among users
 


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 - MVP Outlook

: Outlook Categories? Category Manager Is Your Tool
: VBOffice Reporter for Data Analysis & Reporting
: http://www.vboffice.net/product.html?pub=6&lang=en


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 [MVP - Outlook]" 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 - MVP Outlook

: Outlook Categories? Category Manager Is Your Tool
: VBOffice Reporter for Data Analysis & Reporting
: http://www.vboffice.net/product.html?pub=6&lang=en


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.




All times are GMT +1. The time now is 12:24 PM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com