A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Distributing incoming mail among users



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old August 4th 09, 04:47 AM posted to microsoft.public.outlook.program_vba
Sam
external usenet poster
 
Posts: 143
Default 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.
  #2  
Old August 4th 09, 06:57 PM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default 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.

  #3  
Old August 4th 09, 07:39 PM posted to microsoft.public.outlook.program_vba
Sam
external usenet poster
 
Posts: 143
Default 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.


  #4  
Old August 7th 09, 09:56 PM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default 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.


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Distributing outlook code John Outlook - General Queries 1 October 25th 07 05:50 AM
Distributing outlook code John Outlook and VBA 1 October 25th 07 05:50 AM
Direct incoming email for two users (accounts) to separate folders Dave of Bridgewater Outlook - General Queries 2 November 17th 06 03:51 PM
Help!! Distributing an outlook search? (.OSS) [email protected] Outlook - General Queries 2 February 20th 06 04:26 PM
Distributing a Macro sweens319 Outlook and VBA 2 January 10th 06 06:48 PM


All times are GMT +1. The time now is 12:28 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-2025 Outlook Banter.
The comments are property of their posters.