![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
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
|
|||
|
|||
![]() 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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]() 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 |
Display Modes | |
|
|
![]() |
||||
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 |