Automate to send few information

G

Guest

Hello,

Daily I am receiving a mail with the same subject. The email will only
consist of 3 lines text. The first two lines are always the same. The third
line will be different with the data on the particular day.

I want to send the info which is in the third line along with the standard
text which I compose daily to an another receipient.

I want to automate this process, whenever I get the mail, the outlook should
automatically compose the message for me and send to the receipient which I
mentioned. Any coding for this please.
 
M

Michael Bauer [MVP - Outlook]

You can create a Run-a-Script-Rule that recognizes the e-mail by its subject
and calls a script. That one might look like this:

Public ScriptName(Mail As Outlook.MailItem)
Dim ar() as String
ar=Split(Mail.Body,vbcrlf)
End Sub

Now the Array ar contains each line in one Array item. Maybe ar(2) is what
you call the third line, maybe it's not. That depends on how many line
breaks are in the e-mail's body.

Once, you have that line you can create a new e-mail with the CreateItem
function or call Forward to forward the item. Write e.g. ar(2) into the
mail's Body property, add the recipients's address via Recipients.Add and
call Send.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
Keep your Outlook categories organized!
http://www.shareit.com/product.html?productid=300120654&languageid=1
(German: http://www.VBOffice.net/product.html?pub=6)

Am Sun, 31 Dec 2006 20:34:00 -0800 schrieb mrbalaje:
 

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