[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Outlook autoreply rule

Posted on 2012-03-20
4
Medium Priority
?
2,082 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 2000 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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

In this article I discuss my selections of the Top Four free Outlook OST File Viewers available. Open, view and read even damaged OST files by using these tools. They all provide a clear preview of all data such as emails, notes, tasks, calendars, e…
I came across an unsolved Outlook issue and here is my solution.
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: …
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

872 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