Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.
Sub ReportsSend() 'Application.ScreenUpdating = False 'Application.DisplayAlerts = False Sheets("mailer").Select Range("ReportBody").Select Dim MailToAddress As String MailToAddress = Range("ReportTo").Value Dim MailCcAddress As String MailCcAddress = Range("ReportCc").Value Dim MailSubject As String MailSubject = Range("ReportSubject").Value Dim ReportAttachment1 As String Dim ReportAttachment2 As String ReportAttachment1 = Range("Report1").Value ReportAttachment2 = Range("Report2").Value ' Show the envelope on the ActiveWorkbook. ActiveWorkbook.EnvelopeVisible = True ' Set the optional introduction field thats adds ' some header text to the email body. It also sets ' the To and Subject lines. Finally the message ' is sent. With ActiveSheet.MailEnvelope .Item.To = MailToAddress .Item.CC = MailCcAddress .Item.Subject = MailSubject .Item.Attachments.Add ReportAttachment1 .Item.Attachments.Add ReportAttachment2 .Item.Send End With End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.