Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1565
  • Last Modified:

Outlook script for auto reply

I am in need of scripting an auto reply for outlook 2003.
I need this to key on part of the subject line and also the domain of the sending email address.
I then want my reply to have the original subject line with some additional text which I would define.
I would also define the body of the email to be sent.

Example:
To: Original sender
From: me
Subject: Original Subject plus what I have defined in the script.

Body of the email which I have defined in the script.

I appricate any help offered.
0
Stevrino
Asked:
Stevrino
  • 4
  • 4
1 Solution
 
David LeeCommented:
Hi, Stevrino.

The two conditions can be handled by a rule.  I can post a script that'll do the rest.  There is an issue you need to be aware of though.  Sending a message via script is going to trigger Outlook's internal security.  The result will be a dialog-box popping up warnign you that an application is accessing your mailbox and asking for your permission to allow it to proceed.  That pretty much kills the process from being automatic.  There is no way to turn Outlook security off, but there are workarounds.  

1.  Write the code as an add-in.  Add-ins have different security constraints from macros.  Unfortunately, they are also more difficult to write.

2.  Sign the code with a digital signature.  A digital certificate is preferable, but you can "self-sign" code.  Here's a link to Microsoft instructions on how to do this: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnoxpta/html/odc_dsvba.asp

3.  Use Click-Yes.  This is a free third-party utility that sits in your system tray and watches for the security warning dialog-box.  When one pops up it clicks the Yes button for you.  In my opinion it's dangerous though.  Here's a link to it: http://www.contextmagic.com/express-clickyes 

4.  Outlook Redemption.  This too is a third-party utility that allows you to circumvent Outlook security.  It isn't risk free, but I believe it's safer.  It's not free though and is meant more for developers than a casual user.  Here's a link to it: http://www.dimastr.com/redemption
0
 
StevrinoAuthor Commented:
Thanks BlueDevilFan.
I have a rule running already. The issue is it will only send 1 reply back to an address. I need it to send back to the same address if more than 1 email is sent, That is why I was thinking a script would be better. I do use Click-Yes now. I would also be interested in the "self-sign" you mentioned as well. I will look at it.
So you are saying use rules for the conditions and a script for the rest? Tell me more.
0
 
David LeeCommented:
By having the rule fire a script, via the "run a script" action, the script will send a response every time a message meeting the rule condtions arrives.  Of course this is a client-side rule, so it will only work when Outlook is running.  You can edit the subject and body as you see fit.
Sub Respond2Msg(Item As Outlook.MailItem)
    Dim olkMsg As Outlook.MailItem
    Set olkMsg = Item.Reply
    With olkMsg
        .Subject = Item.Subject & " My additional text goes here"
        .Body = "My body text"
        .Send
    End With
    Set olkMsg = Nothing
End Sub

Open in new window

0
Microsoft Certification Exam 74-409

VeeamĀ® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
StevrinoAuthor Commented:
Thanks BlueDevilFan, works like a charm.
0
 
David LeeCommented:
You're welcome.  Glad I could help.
0
 
StevrinoAuthor Commented:
BlueDevilFan,

If I want more than 1 body line how can I do that with particular breaks.
I see that HTML code will not work.
I can get more than 1 line but it is just 1 big long one that splits over the required lines.
0
 
David LeeCommented:
You can use HTML, we just need to change this line

    .Body = "My body text"

to

    .HTMLBody = "My body text<br>goes here"

0
 
StevrinoAuthor Commented:
Thanks again.
I did find that in the help section after I asked you the question. I appreciate all your help.
0
 
priteshjchauhanCommented:
Is there a way to include the original mail in the reply...eg, so if someone emails me, I can reply with a message including their mail inside it?

Thanks

Pritesh
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now