How do I use a rule to reply to an email?

R

RichardM

Here's my problem. I am trying to figure out how to setup a rule in Outlook
2003. On a daily basis, I receive 3 - 5 separate emails, from an outside
vendor, containing files for my review. Each subject line is unique and
contains the name of the file being sent. I would like a rule which would
acknowledge each file and do it so the sender knows which file has been
received, i.e. ‘re: FileA Received’, ‘re: FileB received’, etc.

Will I need a special macro or can I use the built-in rules for Outlook to
accomplish this task. I do not have the knowledge to script a macro. Any
help would be greatly appreciated.

Thanks!
 
M

Michael Bauer [MVP - Outlook]

You can use the ItemAdd event of the Inbox for that, it tells you when a new
message arrives. In that event check the item's SenderEMailAddress and
Subject. If it's an item you want to reply on then call it's Reply function.
That function returns a new MailItem object. You can edit it's Subject
property and call the Send method.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
Quick-Cats - The most effective way to assign Outlook categories:
http://www.shareit.com/product.html?productid=300120654&languageid=1
(German: http://www.VBOffice.net/product.html?pub=6)

Am Wed, 11 Apr 2007 14:10:01 -0700 schrieb RichardM:
 
R

RichardM

Thanks for the info Michael, however, I do not know how to construct a macro
(which is what I assume you're suggesting). Can I get specifics please?

Thanks again
 
M

Michael Bauer [MVP - Outlook]

In VBA IDE (ALT+f11) please open the object browser (f2) and switch from
<All libraries> to Outlook.

On the left pane select 'Items', on the right one the 'ItemAdd' event. Then
press f1 for a sample which shows you how to receive that event.

The event procedure could look like this:

Private Sub Items_ItemAdd(ByVal Item As Object)
Dim Mail As Outlook.MailItem

If TypeOf Item is Outlook.MailItem Then
set Mail = item

' checks the address, it's not case sensitive
If LCase$(Mail.SenderEMailAddress) = LCase$("...") Then
' go on here


Endif
Endif

End Sub

You can see all of the MailItem's properties in the object browser, too. If
the mail is from your vendor then you probably need to parse its Subject
property. Please see the help file for how to use the Instr, Left, and Right
functions for that.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
Quick-Cats - The most effective way to assign Outlook categories:
http://www.shareit.com/product.html?productid=300120654&languageid=1
(German: http://www.VBOffice.net/product.html?pub=6)

Am Thu, 12 Apr 2007 07:16:02 -0700 schrieb RichardM:
 
R

RichardM

Thanks again! I'll give that a try.

Michael Bauer said:
In VBA IDE (ALT+f11) please open the object browser (f2) and switch from
<All libraries> to Outlook.

On the left pane select 'Items', on the right one the 'ItemAdd' event. Then
press f1 for a sample which shows you how to receive that event.

The event procedure could look like this:

Private Sub Items_ItemAdd(ByVal Item As Object)
Dim Mail As Outlook.MailItem

If TypeOf Item is Outlook.MailItem Then
set Mail = item

' checks the address, it's not case sensitive
If LCase$(Mail.SenderEMailAddress) = LCase$("...") Then
' go on here


Endif
Endif

End Sub

You can see all of the MailItem's properties in the object browser, too. If
the mail is from your vendor then you probably need to parse its Subject
property. Please see the help file for how to use the Instr, Left, and Right
functions for that.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
Quick-Cats - The most effective way to assign Outlook categories:
http://www.shareit.com/product.html?productid=300120654&languageid=1
(German: http://www.VBOffice.net/product.html?pub=6)

Am Thu, 12 Apr 2007 07:16:02 -0700 schrieb RichardM:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top