Accessing attachments which are blocked by outlook?

  • Thread starter Thread starter MatrimCauthon
  • Start date Start date
If you look at the Attachments collection of an email message with
only 1 attachment, which is a blocked attachment, you will see that in
the Outlook object model the Attachments.Count = 0. CDO 1.21 will show
the same.

You would need to use Extended MAPI or Redemption
(www.dimsatr.com/redemption) to access the blocked attachments. In
Redemption code:

Dim safMail As Redemption.SafeMailItem
Dim oMail As Outlook.MailItem

'the open message has a blocked attachment

Set oMail = Application.ActiveInspector.CurrentItem
Debug.Print oMail.Attachments.Count 'shows 0

Set safMail = CreateObject("Redemption.SafeMailItem")
safMail.Item = oMail
Debug.Print safMail.Attachments.Count 'shows 1
 
Back
Top