-1

Using VBA or an Add-in or different automatic method I want to do the following:

When I create a new email and before I send it, I would like to copy the subject of the email and paste it at the beginning of the text message. After sending the email, the recipient will see the subject in the subject box as before and will also see it at the the top of the message.

For example:

Before:

Subject: New Schedule

Message: Monday, Wednesday, Friday

After applying the macro or other automatic methods:

Subject: New Schedule

Message:

New Schedule

Monday, Wednesday, Friday

any Example if possible?

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
Menachem
  • 265
  • 1
  • 4
  • 17

1 Answers1

1

You can handle the ItemSend event of the Application class where you may modify the message body. It is fired whenever an Microsoft Outlook item is sent, either by the user through an Inspector (before the inspector is closed, but after the user clicks the Send button) or when the Send method for an Outlook item, such as MailItem, is used in a program.

The Outlook object model provides three main ways for working with item bodies:

  1. Body.
  2. HTMLBody.
  3. The Word editor. The WordEditor property of the Inspector class returns an instance of the Word Document which represents the message body. So, you can use the Word object model do whatever you need with the message body.

See Chapter 17: Working with Item Bodies for more information.

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45
  • Thank you Eugene for your reply. I was hoping to avoid the learning curve of VBA for Outlook by getting a code example that does the job. You reply is very helpful and I probably do not have a choice but to learn VBA for outlook and write the code. I will also look at chapter 17. – Menachem Aug 07 '15 at 20:18