简体   繁体   中英

Using VBA or Ad-in for Outlook 2010 to copy new email subject to the message

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM