Quantcast
Channel: Excel IT Pro Discussions forum
Viewing all articles
Browse latest Browse all 11829

Attachments are piling up every time when macros is used

$
0
0

Hello i am using a template for daily use. I have an attachment sent every time macros is used.

every time i use, it keeps on piling up the attachments. 

Sub test()

Sheets("test").Select      
   ActiveSheet.Range("D2:D36").Select   
   ActiveWorkbook.EnvelopeVisible = True     
    With ActiveSheet.MailEnvelope
      .Item.To = "test@test.com"
            .Item.Subject = Range("D1")
        .Item.Attachments.Add ("c:\text.txt")
        .Item.display
                .Send
         End With
          End If
End Sub

So need to know is there any way were i can send attachment once, regardless of how many times i use the macro on same sheet...


Viewing all articles
Browse latest Browse all 11829

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>