Outlook rule that replies to an email in the body rather than the sender

2

0

I am wondering if it is possible to set up a rule in outlook that responds to an email in the body rather than replying to the actual sender.

We receive emails through a website for people wanting to sign up to our database, however all the emails come from the same email address - automated response (the company that look after the website) and the details of the people requesting to sign up, including their email are all in the body of text.

I was wondering if there is an option to select which email the reply should go to?

I'm using Outlook 2010

Thank you for any help, Sarah

SarahB

Posted 2015-05-01T09:27:30.443

Reputation: 23

Answers

2

Your email is clear but lacks detail, such as where the email is. Yes, in the body, but that doesn't really help, as such I've created a demo mock up which should be easy enough to follow :

Let's assume the email I receive is in the following format:

Dear Sir,

We received the following detail

Email: myEmail@domain Phone: 12345

We will be in touch

Signed off

The following VBa code will find the email address, and open a new email with this address in the To field

Sub MailItemContent2()
    Dim olItem As Outlook.MailItem
    Dim sText As String
    Dim sEmail As String
    Dim emailWords() As String
    Set olItem = ActiveExplorer.Selection.Item(1)
    sText = Replace(olItem.Body, vbCrLf, " ")
    emailWords = Split(sText, " ")
    Dim i As Integer
    Dim emailIndex As Integer
    emailIndex = -99
    isNext = False
    For i = 0 To UBound(emailWords)

        If (emailIndex = i) Then
           sEmail = Split(emailWords(i), Chr(34))(2)
           Exit For
        End If

        If emailWords(i) = "Email:" Then
            emailIndex = i + 2
        End If

    Next i

    Set objMsg = Application.CreateItem(olMailItem)

 With objMsg
  .To = sEmail
  '.CC = "name@domain.com"
  '.BCC = "name@domain.com"
  '.Subject = "The subject"
  '.Categories = "Test"
  '.VotingOptions = "Yes;No;Maybe;"
  '.BodyFormat = olFormatPlain
  '.Importance = olImportanceHigh
  '.Sensitivity = olConfidential


  .Display
End With

Set objMsg = Nothing        

End Sub

MyDaftQuestions

Posted 2015-05-01T09:27:30.443

Reputation: 1 459

Hi, yes the emails are actually set out just like that. Thank you for taking the time to answer my questions - that has been really helpful, thanks Sarah – SarahB – 2015-05-05T09:16:34.350

Then feel to upvote or mark as answer @SarahB – MyDaftQuestions – 2015-05-05T09:28:24.443