DeleteAfterSubmit on mail with Attachment

  • Thread starter Thread starter Sriram N A \(MICO/PJ-SAP-PP\) *
  • Start date Start date
S

Sriram N A \(MICO/PJ-SAP-PP\) *

I have the following VBA code in the ThisOutlookSession module
(VbaProject.OTM) in Outlook 2003 (Corporate):

Private Sub Application_ItemSend(ByVal item As Object, Cancel As Boolean)
With item
If .Importance = olImportanceLow Then
.ReadReceiptRequested = False
.DeleteAfterSubmit = True
End If
End With
End Sub

Messages flagged as low importance are not saved in the Sent Items folder as
intended, except when the message has an attachment. In these cases, the
message is retained in Sent Items. Bug?
 
Did you try setting a breakpoint to see if which code statements are
executing?
 
All statements do execute when I check with breakpoints, and it functions as
expected! Its a fact that not all invocations of the code fail. Perhaps it
has something to do with the timing involved in attaching and sending
largish files... I'll do some more checking for now.
 
Let us know what you find out. If you have a reproducible scenario, we can
send it on to Microsoft.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
I'm able to narrow it down to cases where mail with an attachment is sent to
a GAL Distribution List with several members. Perhaps an artefact of the
Outlook spooler?
 
Perhaps, but since your latest post omits all the previously discussed
details about the nature of the problem, Outlook version, etc., I'm in the
dark.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Sorry about that... in their wisdom, our news server admins have set things
up so that a message with "More quoted text than new text" doesn't get
through...

The best I can do then would be to point to the earlier post thusly:

Sriram
 
Back
Top