Consulting

Results 1 to 2 of 2

Thread: automatically response / reply

  1. #1

    automatically response / reply

    Hi,

    Background
    My work now as service desk and i have KPI that need to response email for any request within 15 minutes.
    so, is it possible i can do that using macro or something

    Target
    Outlook will automatic reply with words "Acknowledge, we will check" for any email with specific subject "REQDATA2014". but reply will work with

    1. only new mail comes (not from replying mail RE: )
    2. Reply using the original body not using template


    I have searched and was trying using template only, so the replied mail will use template not the original mail.

    Please help and let me know if there is information needed

    Thanks in advance

  2. #2
    It has been a few days since your post but it is the holiday season

    What you ask is fairly straightforward, but it isn't really within the spirit of the task.

    Call the following script from an Outlook Rule that applies to incoming messages. I have commented out the subject check as this would be better included as part of the rule itself, but you can put it back if you wish. The reply will include the original message with your message and default signature at the top.

    Sub Acknowledge(olItem As Outlook.MailItem)
    Dim i As Long, j As Long
    Dim olOutMail As Outlook.MailItem
    Dim olInsp As Outlook.Inspector
    Dim wdDoc As Object
    Dim oRng As Object
        'If InStr(1, olItem.Subject, "REQDATA2014") > 0 Then
            If InStr(1, "Re: ") = 0 Then
                Set olOutMail = olItem.Reply
                With olOutMail
                    .BodyFormat = olFormatHTML
                    Set olInsp = .GetInspector
                    Set wdDoc = olInsp.WordEditor
                    Set oRng = wdDoc.Range(0, 0)
                    oRng.Text = "Acknowledge, we will check"
                    .Display
                    .Send
                End With
                Set olOutMail = Nothing
            End If
        'End If
    lbl_Exit:
        Exit Sub
    End Sub
    To test it comment out the .Send line and use the following macro with a selected message in your inbox. It will produce the reply without sending it.

    Sub Test1()
    Dim olMsg As MailItem
        On Error Resume Next
        Set olMsg = ActiveExplorer.Selection.Item(1)
        Acknowledge olMsg
    lbl_Exit:
        Exit Sub
    End Sub
    Graham Mayor - MS MVP (Word) 2002-2019
    Visit my web site for more programming tips and ready made processes
    http://www.gmayor.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •