Solved

Outlook autoreply rule

Posted on 2012-03-20
4
1,990 Views
Last Modified: 2012-06-27
Hi All,
Scripting is definitely not my strong suite and would really appreciate some help with an issue I am facing at the moment.
Running in an Exchange 2007/Outlook 2010 environment.

My question is, is there a way to automate a reply received from a specific address/mailbox?  The reply would need to include the original emails subject line and a brief your email has been received and will now be processed message.
I have had a look at setting this up using Outlook rules, with the actions being run a script or perform a custom action (reply using a specific template – does not allow the original message subject line to be included).

Cheers,
Adam

* I have found a script that works well, and nearly does everything that I am after, the only thing that I need changed is the subject line to use the original email subject.

Sub AutoReply(Item As Outlook.MailItem)
    Dim olkReply As Outlook.MailItem
    Set olkReply = Item.Reply
    With olkReply
        'Change the subject on the next line as desired'
        .Subject = "Your Subject Goes Here"
        'Change the body as desired'
        .HTMLBody = "Your reply text goes here.<bt><br>" & olkReply.HTMLBody
        .Send
    End With
    Set olkReply = Nothing
End Sub
0
Comment
Question by:whitewire
  • 2
  • 2
4 Comments
 
LVL 76

Accepted Solution

by:
David Lee earned 500 total points
ID: 37746636
Hi, Adam.

You're so very close to the solution.  To get the subject of the message that triggered the rule you just need Item.Subject.  Like this.

Sub AutoReply(Item As Outlook.MailItem)
    Dim olkReply As Outlook.MailItem
    Set olkReply = Item.Reply
    With olkReply
        'Change the subject on the next line as desired'
        .Subject = Item.Subject
        'Change the body as desired'
        .HTMLBody = "Your reply text goes here.<bt><br>" & olkReply.HTMLBody
        .Send
    End With
    Set olkReply = Nothing
End Sub

Open in new window

0
 

Author Comment

by:whitewire
ID: 37750403
Hi BlueDevilFan,

Thanks for your help, i have replaced the required line with the one you have provided, but now the script is not working at all, I have restored back to the original, and also deleted the module and recreated. This has not corrected the issue, I am really confused as this was working all day yesterday. There are currently no replys being generated as nothing appears in the sent item box.

cheers,
Adam
0
 

Author Comment

by:whitewire
ID: 37750472
I was creating a new module within Visual Basic Editor, i have pasted amended script into this outlook session and replys are now being recieved.
0
 
LVL 76

Expert Comment

by:David Lee
ID: 37750591
Good deal.  Glad you have it working.  Cheers!
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Read this checklist to learn more about the 15 things you should never include in an email signature.
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question