Log in

View Full Version : newbie to Outlook objects-auto responder with distrib list



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.

Trevor
12-10-2007, 05:20 PM
I think your code would may have to run on the pc hosting the department email, because if it runs on just yours the code would only run for emails on your computer but everyone else in the department would still have the department account
aside from that I'm not too sure. I have a simler problem with a department email account, were 2 depertment members should only recieve email from serine states, so rather then have everyone filter through this department inbox I have set up an Access db to read the mail then use a lookup table to determin who should get that mail and add that mail to the db then send the 2 people should should recieve that email an email letting them know that they have email and the reference # in the db to look at if you need to filter on subject line content, I thaught I had the link with me, I'll have to post that link when I get to my other computer in a few hours

Trevor
12-13-2007, 09:43 AM
go to fabalou site put www infront of it and and .com after and if you search the site you should find the page that gives you direction to filter email by subject line (i can't post links yet so I got creative)

Trevor
12-13-2007, 09:52 AM
making last post so I can post that link for you

Trevor
12-13-2007, 09:53 AM
http://www.fabalou.com/Access/Modules/reading_email.asp here is the link to filter email by subject words