J
Jonas Herby
Hi
I'm trying to create a macro which delete the attachments in sent
items in MS Outlook. I have found a code that works fine - the only
problem is that I have to open the mail first. And I can't find any
command which does this.
I simply want to be able to click a button in Outlook , and then run a
macro which opens the message, delete the attachments, and closes the
messaeg again.
Can anyone help me?
The code which delete the attachments is here:
*******************************
Sub DelAtt()
Set itm = Application.ActiveInspector.CurrentItem
If Not itm Is Nothing Then
itm.Save
AttachmentCount = itm.Attachments.count
For lngIndex = AttachmentCount To 1 Step -1
Set att = itm.Attachments(lngIndex)
att.Delete
Next
End If
itm.Close
End Sub
*******************************
I'm trying to create a macro which delete the attachments in sent
items in MS Outlook. I have found a code that works fine - the only
problem is that I have to open the mail first. And I can't find any
command which does this.
I simply want to be able to click a button in Outlook , and then run a
macro which opens the message, delete the attachments, and closes the
messaeg again.
Can anyone help me?
The code which delete the attachments is here:
*******************************
Sub DelAtt()
Set itm = Application.ActiveInspector.CurrentItem
If Not itm Is Nothing Then
itm.Save
AttachmentCount = itm.Attachments.count
For lngIndex = AttachmentCount To 1 Step -1
Set att = itm.Attachments(lngIndex)
att.Delete
Next
End If
itm.Close
End Sub
*******************************