Read subject line of look, to verify the user has replied to the sent mail. RRS feed

  • Question

  • Hi Friends,

    We create cases and send mail to the respective person through outlook 2016.

    On the subject line these will case number for example [CASE:001]

    Once we send this mail user replies back to the same mail acknowledging. Then we close the case.

    I need a script to run in outlook using windows tools itself like powershell or vb script to check whether the user has replied to the email we sent. so that for us closing the case will be easier.

    And also if possible the case and user reply saved in a excel file would be much better.

    Kindly help me as i m very new to programming or scripting its tough for me.

    Thanks a lot.

    Monday, July 3, 2017 5:22 PM

All replies

  • Hi jai6684,

    Will the receiver change the mail subject?

    In general, when replying a mail, the subject like be “RE:….”, if so, I think you could try below code to get the replied mail.

    Sub GetReMail()
     Dim oMail As MailItem
     Dim myFolder As Folder
     Set myFolder = Application.Session.GetDefaultFolder(olFolderInbox).folders("Folder Name")
     For Each oMail In myFolder.Items
        If InStr(oMail.Subject, "RE") Then
            Debug.Print oMail.Subject
        End If
     Next oMail
    End Sub

    Best Regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Tuesday, July 11, 2017 7:48 AM