Outlook Developer Home
Outlook Programmer's Library
 
Outlook Technologies
Outlook Forms
Languages
Samples
Other Technologies

 

To require confirmation when sending to an Exchange distribution list

This Outlook VBA code demonstrates how to use the ItemSend event to examine a message as it is sent and determine whether any of the recipients is an Exchange Server mailing list. If so, the user is asked to confirm the message. If the user declines, the transmission is cancelled.

In order to avoid Outlook security prompts, it uses the Redemption library. This code should be placed in the ThisOutlookSession module in Outlook VBA. Either the project must be signed or the macro security level set to Low or Medium.

Code Sample

 

Notes

Note that before the code can access the outgoing message with Redemption, the message must be saved.

Is it possible to do the same thing, but for an Outlook distribution list, not an Exchange DL? No, because Outlook automatically expands the DL when you send the item. By the time it gets to the ItemSend event, there's no trace in the message that it was ever addressed to an Outlook DL. Instead, however, you could check the number of recipients (objSafeMail.Recipients.Count) and cancel the send if it's too large.

This code is intended for individual use. If you wanted to implement this functionality throughout an organization, you'd want to build it into a COM add-in.

More Information

More samples for the Application.ItemSend event:

   
© 2002-7 TurtleFlock, LLC
All right reserved.
About OutlookCode.com

Send comments to webmaster@outlookcode.com

Designed and Implemented by TerraLink USA 

FrontPage Integration
by RobsonDesignWorks

 
 
get Sue's code | forums | share your own code | registration