Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have the following problem:

  • I have a mails that are arriving in my mailbox
  • these mails contain a specific string in the body
  • what I want to do is:
    • --> removing this string from the body
    • --> then send this body to another mail address (send, not forward)

What have I already done:

A. Created a rule that activates the script in incoming messages that contain a certain string in the description

This is the rule description:

Apply to message
with "Maileater" in the subject
  and on this computer only
run "Project1.ChangeString"

B. Created the script with the following instructions:

Public Sub ChangeString(MyMail As MailItem)

   Dim body As String
   body = MyMail.body

   body = Replace (body, "=====================================================", " ")
   MyMail.body = body

End Sub

C. Now I want to add in the script the instruction to send the body (or MyMail.body) to a specific mail address (e.g. with description "Support asked") after the replacement of the string.

Is this possible?

Can someone help me with this, I would be very greatfull because this will eliminate a lot of manual work for me.

This is just an exemple of a mail, the real thing will contain other replacements and mails to send.

share|improve this question

You must log in to answer this question.

Browse other questions tagged .