I am using the below code that I found on the web. I am having issues getting the email to send automatically. All actions will work except the .Send function.
Any help would be appreciated. Thanks in advance.
Note: I have note experience with macros.


Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)

Dim Outlook As Object, EMail As Object

Set Outlook = CreateObject("Outlook.Application")

Set EMail = Outlook.CreateItem(0)

With EMail
.To = "sample.com"
.CC = ""
.BCC = ""
.Subject = "PLC Change Log Update"
.Body = "Sender has modified the attached file"
.Attachments.Add ActiveWorkbook.FullName
.Send
'.Display



End With


Set EMail = Nothing

Set Outlook = Nothing
Application.Quit
ThisWorkbook.save


End Sub