Solved

Outlook autoreply rule

Posted on 2012-03-20
4
1,925 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Learn more about how the humble email signature can be used as more than just an electronic business card. When used correctly, a signature can easily be tailored for different purposes by different departments within an organization.
Create high volume marketing opportunities using email signatures with these top 10 DOs and DON'Ts of email signature marketing.
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …
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: …

746 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now