Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for the help. This was what I was looking for. However if I execute
this code multiple times it is almost as if the file to be attached is saved to a clipboard. Each subsequent time I execute the code the previously attached file is also added. i.e. If I run the code a second time it not only attaches the file selected by the code but also the file selected by the code when run previously. Is there a way to "clear" the clipboard so only the one file is attached? "arjen van..." wrote: Try something like this: Sub NewMail() ActiveWorkbook.EnvelopeVisible = True Dim strAttachment As String strAttachment = "C:\customers.txt" With ActiveSheet.MailEnvelope .Introduction = Range("T22") .Item.To = Range("T15") .Item.CC = Range("T16") .Item.Subject = "CST CARRIERS" .Item.Send .Item.Attachments.Add strAttachment End With End Sub Though I think creating the string variable isn't essential, you could just put the path directly after .Add |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How can you attach an e-mail into an excel worksheet? | Excel Worksheet Functions | |||
Mail worksheet in Body AND Attach File | Excel Programming | |||
e-Mail File out of Excel 2003 Macro | Excel Programming | |||
E-mail macro - how do I attach multiple attachments? | Excel Discussion (Misc queries) | |||
How do I attach an excel document to a word one for mail merge? | Excel Discussion (Misc queries) |