Dr.K
07-03-2007, 09:02 AM
I have a ton of experience programing VBA through Excel, but I'm totally new to using VBA in Outlook.
First, some basic questions:
What constitutes a "project" in Outlook? ie, where do I put the code? The help file says that event trapping must be done in a class module... I'm guessing that 'ThisOutlookSession' object a class module, right?
Does ALL of my code go in the class module? When should I put a sub into a standard module?
How about a shared mailbox?
We have an inbox for work requests that is shared by the whole department... I have access to the box, but it does belong to one person in the department. Will I be able to run the auto-responder code from my PC, or does it have to run on the PC that "owns" the shared mailbox?
Ok, so what follows is my skeleton code... if anyone has any suggestions or code snippets, I would greatly appreciate it.
When email sent to the group box arrives: (event)
1. Check to see if the sender is in the "Request Form Users"
distribution list.
2. if not in list, add them to list, and send an autoresponse with
the latest version of the request form as an attachment.Exit Sub.
3. (else) If in List, check subject line.
4. if subject line = "Need Request Form", then send autoresponse
with the latest version of the request form as an attachment.
Delete incoming message, and exit sub.
5. exit sub
Any advice or links appreciated.
First, some basic questions:
What constitutes a "project" in Outlook? ie, where do I put the code? The help file says that event trapping must be done in a class module... I'm guessing that 'ThisOutlookSession' object a class module, right?
Does ALL of my code go in the class module? When should I put a sub into a standard module?
How about a shared mailbox?
We have an inbox for work requests that is shared by the whole department... I have access to the box, but it does belong to one person in the department. Will I be able to run the auto-responder code from my PC, or does it have to run on the PC that "owns" the shared mailbox?
Ok, so what follows is my skeleton code... if anyone has any suggestions or code snippets, I would greatly appreciate it.
When email sent to the group box arrives: (event)
1. Check to see if the sender is in the "Request Form Users"
distribution list.
2. if not in list, add them to list, and send an autoresponse with
the latest version of the request form as an attachment.Exit Sub.
3. (else) If in List, check subject line.
4. if subject line = "Need Request Form", then send autoresponse
with the latest version of the request form as an attachment.
Delete incoming message, and exit sub.
5. exit sub
Any advice or links appreciated.