Hi,
I mainly use Outlook to send emails, and on some I attach a document. My code mainly revolves around this line:
vMailItem.Attachments.Add( filename ); (vMailItem being the Outlook item object.
However, what I'm finding is that after I've sent an email with a file, if I want to send another email but without a file, the file is still attached to the email. I've cleared the edit box which holds the file name (which I use to get the name of the file).
I use a boolean variable to say whether there is an attachment or not and that code does bypass the above line, but the previous file is still being attached.
Is there a method which can remove any previous file attachments to an email, like 'vMailItem.Attachments.Remove' ?