Results 1 to 15 of 15

Send worksheet as an attachment to specified recipients via outlook

Threaded View

  1. #1
    Forum Contributor
    Join Date
    08-12-2010
    Location
    Excel World
    MS-Off Ver
    Excel 2013, 2019 & O365
    Posts
    214

    Question Send worksheet as an attachment to specified recipients via outlook

    Hi All,

    I've got some codes form http://www.ozgrid.com/VBA/send-email.htm

    Below Codes work fine, but just for one recipient and without any message body.
    Sub SendActiveWorkbook()
    
        ActiveWorkbook.SendMail _
        Recipients:="1is2@gmaaal.com", _
        Subject:="Try Me " & Format(Date, "dd/mmm/yy")
    
    End Sub
    Here I would like to get the options to add more Recipients with the message body.
    For Example:
    To:1is2@gmaaal.com
    CC:1is3@gmaaal.com;1is4@gmaaal.com;2is20@hotttmail.com
    Subject: Data Updated on "System Time"
    Message Body: This is a system generated mail. Please do not reply.
    I tried with below codes for adding more recipients, but did not get the above desired solution.
    Sub Send1Sheet_ActiveWorkbook()
    '
    ' To send any specified Excel Worksheet as an attachment to specified recipients
    'Create a new Workbook Containing 1 Sheet (left most) _
     and sends as attachment.
    
        ThisWorkbook.Sheets(1).Copy
    
        With ActiveWorkbook
            Range("A1").Value = VBA.Date
             Range("A2").Value = VBA.Time
             
             .SendMail Recipients:=Array("1is2@gmaaal.com", _
                             "2is20@hotttmail.com"), _
              Subject:="Hello! " & Format(Date, "dd/mmm/yy")
             .Close SaveChanges:=False
    
        End With
    
    End Sub
    I hope you guys make it easy for me, Thanks in advance!
    Last edited by SunOffice; 04-10-2011 at 07:55 AM.
    Excelforum is Completely Awesome! True learning with Live Examples & Best Techniques!!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1