MS Outlook: Auto Reply with an attached form

Posted on 2010-01-07
Last Modified: 2012-05-08
Hi Experts, I'm putting together a simple ticketing system of sorts.  I have an outlook mail box in which users submit questions.  I want to be able to auto reply to each message that is received with a message that has an outlook form in the body (the form will be used to collect additional standard information).  In part of the form I will have a "Description" text box which I would like to automatically populate with the contents of the original email (i.e., Dear Mailbox - please help me with XYZ).  I also to populate a field for "Requester" which would contain the email address of the original sender (as an added bonus it would be really cool if this could look up the contact information and get the first/last name of the requester and the contact info).

I know this is a tall bill to fit, but any advise you have would be helpful.
Question by:JamesCbury
    LVL 28

    Expert Comment

    Just design the form to your liking, then create a rule for this particular inbox (you need to create a profile in Outlook and log on to this mailbox). Make a rule that fires on all messages (don't fill in anything in the first wizard window, accept the warning). In the second wizard window, select "reply with a template" and select your form. Finished.

    Author Comment

    Thanks, this is pretty helpful, but I'm looking to grab some of the information that is in the original email and stick it in the form.  My next step is to post the form to a database (I haven't figured that one out yet so any thoughts would be appreciated).  If the info in the original email is in a form, I can easily post it to a field.

    LVL 76

    Accepted Solution

    Hi, JamesCbury.

    This is possible with a simple bit of coding like that below.  Here's how to use it.

    1.  Add the code below to Outlook.  You didn't specify the version of Outlook you're using, so I'm not including instructions for that here.  
    2.  Create a new rule that fires for all messages.
    3.  Set the rule's action to "run a script" and select this script as the one to run.

    When an item arrives it triggers the rule.  The rule then runs the script.  The script creates a new message using your form, populates it with data from the message that triggered the rule, and sends the message.
    Sub AutoResponse(Item As Outlook.MailItem)
        Dim olkForm As Outlook.MailItem
        'Change YourFormName to the name of your form.'
        Set olkForm = Session.GetDefaultFolder(olFolderDrafts).Items.Add("IPM.Note.YourFormName")
        With olkForm
            .Body = Item.Body
            'Your code for populating other fields goes here.'
        End With
        Set olkForm = Nothing
    End Sub

    Open in new window


    Author Closing Comment

    Thanks, this is exactly what I was looking for.  I'll play around with it a bit this week and may have some follow-up questions.

    Thanks again.
    LVL 76

    Expert Comment

    by:David Lee
    You're welcome.  Glad I could help.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Join & Write a Comment

    My experience with Windows 10 over a one year period and suggestions for smooth operation
    Outlook Free & Paid Tools
    The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
    The viewer will learn how to  create a slide that will launch other presentations in Microsoft PowerPoint. In the finished slide, each item launches a new PowerPoint presentation and when each is finished it automatically comes back to this slide: …

    729 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

    20 Experts available now in Live!

    Get 1:1 Help Now