Create a Redemption SafeMailItem

The SafeMailItem of the Redemption library allows you to access properties of an email that are blocked by Outlook's security.

Last modified: 2006/05/21 | Accessed: 25.982  | #30
◀ Previous sample Next sample ▶
ReplyAll ReplyAll
ReplyAll alerts you before unintentionally replying all, or if you are a confidential BCC recipient of the e-mail.

The Redemption library contains Safe*Item objects for every Outlook object that has at least one blocked property or procedure. The mechanismen of blocking some properties was introduced with Outlook 2000 SP2 (optional), or SP3 respectively.

The process, for instance, to create a Redemption.SafeMailItem for an Outlook.MailItem is always the same as is the process for cleaning up the Redemption objects. So why not write reusable functions for both?

tip  How to add macros to Outlook
Private Function CreateSafeItem(Item As Object) As Object
  Dim rdItem As Object

  'E.g.: Outlook's MailItem turns to Redemption's SafeMailItem
  olName = TypeName(Item)
  rdName = "Redemption.Safe" & olName

  Set rdItem = CreateObject(rdName)
  rdItem.Item = Item
  Set CreateSafeItem = rdItem
  Set rdItem = Nothing
End Function

Private Sub ReleaseSafeItem(Item As Object)
  On Error Resume Next
  Set Item.Item = Nothing
  Set Item = Nothing
End Sub
OLKeeper OLKeeper
OLKeeper reliably prevents users from closing their Outlook window and thus possibly missing reminders or e-mails.
email  Send a message