PDA

View Full Version : Outlook Overriding Attachment



pooldead
09-01-2020, 05:24 PM
I have some code in an Access database that creates an Outlook email message with 2 attachments. The problem I'm running into is Outlook is overriding one of my attachments (a PowerPoint file) with some saved version of a previous email draft that has since been deleted completely. I cannot find anywhere in my database code that would cause this, and I've tried clearing the Outlook cache to no avail. I'm wondering if anyone has run into this problem in the past? I'm kind of stuck and have to have that PowerPoint file included.

gmayor
09-01-2020, 08:46 PM
Without seeing the code one can only guess, but ensure that you include code remove any existing attachments before adding new ones. e.g.


For i = olItem.Attachments.Count To 1 Step -1
olItem.Attachments.Remove (i)
Next i