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

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



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5  
Old April 13th 07, 05:58 PM posted to microsoft.public.outlook.program_vba
RichardM
external usenet poster
 
Posts: 3
Default How do I use a rule to reply to an email?

Thanks again! I'll give that a try.

"Michael Bauer [MVP - Outlook]" wrote:



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?...4&languageid=1
(German: http://www.VBOffice.net/product.html?pub=6)

Am Thu, 12 Apr 2007 07:16:02 -0700 schrieb 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

"Michael Bauer [MVP - Outlook]" wrote:



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?...4&languageid=1
(German: http://www.VBOffice.net/product.html?pub=6)

Am Wed, 11 Apr 2007 14:10:01 -0700 schrieb 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. ‘ FileA Received’, ‘ 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!


 




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
Email Rule Question Ralph Page Outlook - General Queries 5 October 16th 06 01:27 PM
FYI -Creting server based outo reply rule in outlook CAMC1 Outlook - General Queries 0 August 1st 06 06:26 PM
Multiple email rule VinceT Outlook Express 4 March 20th 06 10:46 PM
Change "Reply To" Rule [email protected] Outlook and VBA 0 March 1st 06 09:47 AM
Auto reply rule within Outlook 2003 WetBehindEars Outlook - Installation 1 February 15th 06 07:59 PM


All times are GMT +1. The time now is 07:09 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.