Castillb
09-11-2013, 09:45 AM
Hello everyone,
I'm looking for an Outlook macro that would strip out and permanently delete attachments from an email message or group of selected emails. I was able to locate the following script, but I just want to make sure that this script is not saving the attachment anywhere.
Just for my own personal learning, if this strip does permanently deletes the attachments. What exactly happens to them?
I'm using Outlook 2007...
Sub RemoveAttachments()
Dim selectedMailItem As Outlook.MailItem
Dim currentAttachment As Outlook.Attachment
Dim i As Integer
For Each selectedMailItem In ThisOutlookSession.ActiveExplorer.Selection
'Remove attachments until there are none left
While selectedMailItem.Attachments.Count > 0
selectedMailItem.Attachments.Remove (1)
Wend
selectedMailItem.Save
Next
End Sub
I'm looking for an Outlook macro that would strip out and permanently delete attachments from an email message or group of selected emails. I was able to locate the following script, but I just want to make sure that this script is not saving the attachment anywhere.
Just for my own personal learning, if this strip does permanently deletes the attachments. What exactly happens to them?
I'm using Outlook 2007...
Sub RemoveAttachments()
Dim selectedMailItem As Outlook.MailItem
Dim currentAttachment As Outlook.Attachment
Dim i As Integer
For Each selectedMailItem In ThisOutlookSession.ActiveExplorer.Selection
'Remove attachments until there are none left
While selectedMailItem.Attachments.Count > 0
selectedMailItem.Attachments.Remove (1)
Wend
selectedMailItem.Save
Next
End Sub