Add-in Express 2009 for Office and .net Evaluation Question

Add-in Express™ Support Service
That's what is more important than anything else

Add-in Express 2009 for Office and .net Evaluation Question
 
Chris Drake




Posts: 16
Joined: 2009-06-22
Currently evaluating different products for purchase. 2 questions:

1. Can I intercept the Outlook Send event and copy out the text of the e-mail body?

2. Can I automatically add a field to the Messages view in Outlook and update that column based on the send event?

Thank you!
Posted 22 Jun, 2009 15:32:27 Top
Andrei Smolin


Add-in Express team


Posts: 16325
Joined: 2006-05-11
Hello Chris,

1. Outlook provides two events for this: a) MailItem.Send and b) Application.ItemSend. In both case, you can access MailItem.Body (or MailItem.HTMLBody).

2. You can add a UserProperty to the MailItem.UserProperties collection. The UserProperties.Add method provides the AddToFolderFields parameter described as follows:

True if the property will be added as a custom field to the folder that the item is in. This field can be displayed in the folder's view. False if the property will not be added as a custom field. The default value is True.


To add the column to the view in Outlook 2002-2003, you need to parse and change the View.XML property in an appropriate way. In Outlook 2007, you can cast Explorer.CurrentView to an appropriate view type (say, TableView) and use its properties to customize the view.

As to updating this column, you can update the user property and save the item.

Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 23 Jun, 2009 09:46:04 Top
Chris Drake




Posts: 16
Joined: 2009-06-22
Excellent! Thank you for the detailed response Andrei!
Posted 23 Jun, 2009 12:12:14 Top