
Adding Attachments using VBA
Assume that objMsg is a valid MailItem object. (even one built on a custom
form)
With objMsg
' Fill in the To, Subject, .etc
.Attachments.Add "C:\My Documents\Q496.xls", _
olByValue, 1, "4th Quarter 1996 Results Chart"
End With
objMsg.Display
AppointmentItems also support the Attachments object so the code would be
the same as above.
Quote:
> Anyone knows how I do to add an attachment to a MailItem or
> AppointmentItem that I have created?
> I do CreateItem, add som stuff, and before closing I want to add an
> attachment to that object, but I cannot figure out how, I am not even
> sure that it is possible...
> Hoping for an answer!