FROM CHATGPT
Sub SendEmail()
  Dim OutlookApp As Object
  Dim OutlookMail As Object
  Dim Recipients As String
  Dim Subject As String
  Dim Body As String
  Set OutlookApp = CreateObject("Outlook.Application")
  Set OutlookMail = OutlookApp.CreateItem(0)
  'Specify recipients, subject, and body of email
  Recipients = "email1@example.com;email2@example.com;email3@example.com"
  Subject = "Subject line of email"
  Body = "Body text of email"
  With OutlookMail
    .To = Recipients
    .Subject = Subject
    .Body = Body
    .Send
  End With
  Set OutlookMail = Nothing
  Set OutlookApp = Nothing
FROM CHATGPT                    MY VERSION
Sub SendEmail()
  Dim OutlookApp As Object
  Dim OutlookMail As Object
  Dim Recipients As String
  Dim Subject As String
  Dim Body As String
  Set OutlookApp = CreateObject("Outlook.Application")
  Set OutlookMail = OutlookApp.CreateItem(0)
  'Specify recipients, subject, and body of email
  Recipients = "Brendan.Bowler@mwra.com;Robert.Farrell@mwra.com"
  Subject = "Daily Dispatch"
  Body = & date
  With OutlookMail
    .To = Recipients
    .Subject = Subject
    .Body = Body
    .Display
    ‘.Send
  End With
  Set OutlookMail = Nothing
  Set OutlookApp = Nothing
Sub SendWorkbookEmail() Dim OutApp As Object Dim OutMail As Object Dim Recipients As
String Dim Subject As String Dim Body As String Dim FilePath As String 'Get the email
recipients Recipients = "email1@example.com; email2@example.com; email3@example.com"
'Set the email subject Subject = "Workbook Attachment" 'Set the email body Body =
"Please find attached the workbook." 'Get the file path of the active workbook
FilePath = ActiveWorkbook.FullName 'Create a new email message Set OutApp =
CreateObject("Outlook.Application") Set OutMail = OutApp.CreateItem(0) 'Add the
recipients to the email message OutMail.To = Recipients 'Add the subject to the email
message OutMail.Subject = Subject 'Add the body to the email message OutMail.Body =
Body 'Add the workbook as an attachment to the email message OutMail.Attachments.Add
FilePath 'Send the email message OutMail.Send 'Release the email objects Set OutMail =
Nothing Set OutApp = Nothing End Sub
Sub SendWorkbookEmail()
 Dim OutApp As Object
 Dim OutMail As Object
 Dim Recipients As String
 Dim Subject As String
 Dim Body As String
 Dim FilePath As String
 'Get the email recipients
 Recipients = "email1@example.com; email2@example.com; email3@example.com"
 'Set the email subject
 Subject = "Workbook Attachment"
 'Set the email body
 Body = "Please find attached the workbook."
 'Get the file path of the active workbook
 FilePath = ActiveWorkbook.FullName
 'Create a new email message
 Set OutApp = CreateObject("Outlook.Application")
 Set OutMail = OutApp.CreateItem(0)
 'Add the recipients to the email message
 OutMail.To = Recipients
 'Add the subject to the email message
 OutMail.Subject = Subject
 'Add the body to the email message
 OutMail.Body = Body
 'Add the workbook as an attachment to the email message
 OutMail.Attachments.Add FilePath
 'Send the email message
 OutMail.Send
 'Release the email objects
 Set OutMail = Nothing
 Set OutApp = Nothing
End Sub
+++
Sub Send_Email()
  Dim OutApp As Object
  Dim OutMail As Object
  Dim Recipients As String
  Dim Subject As String
  Dim Body As String
  Dim FilePath As String
  'Get the email recipients
  Recipients = "Brendan.Bowler@mwra.com; Robert.Farrell@mwra.com"
  'Set the email subject
  Subject = "Workbook Attachment"
  'Set the email body
  Body = "Please find attached Daily Dispatch."
  'Get the file path of the active workbook
  FilePath = ActiveWorkbook.Daily Dispatch 2023.xlsm
  'Create a new email message
  Set OutApp = CreateObject("Outlook.Application")
  Set OutMail = OutApp.CreateItem(0)
  'Add the recipients to the email message
  OutMail.To = Recipients
 'Add the subject to the email message
 OutMail.Subject = Subject
 'Add the body to the email message
 OutMail.Body = Body
 'Add the workbook as an attachment to the email message
 OutMail.Attachments.Add FilePath
 'Send the email message
 OutMail.Send
 'Release the email objects
 Set OutMail = Nothing
 Set OutApp = Nothing
End Sub
+++
Sub AttachWorkbookIntoEmailMessage()
Dim OutlookApp As Object
Dim OutlookMail As Object
Set OutlookApp = CreateObject("Outlook.Application")
Set OutlookMail = OutlookApp.CreateItem(0)
'Let us create the email message and display it
'Make sure to change the parameters below
With OutlookMail
.To = "support@myexcelonline.com"
.Subject = "Have a look at this workbook"
.Body = "Hey John, Could you help out on this?"
.Attachments.Add ActiveWorkbook.FullName
.Display
End With
Set OutlookMail = Nothing
Set OutlookApp = Nothing
End Sub