Sep 28 2021 08:26 AM
Hello,
Sep 28 2021 09:23 AM
Sep 28 2021 09:43 AM
Here is a VBA code and an example file.
Sub Excel_Workbook_send_with_Outlook_()
Dim Nachricht As Object, OutApp As Object
Set OutApp = CreateObject("Outlook.Application")
Dim AWS As String
'The active workbook is sent as a mail
AWS = ThisWorkbook.FullName
InitializeOutlook = True
Set Nachricht = OutApp.CreateItem(0)
With Nachricht
.To = "lino.excelsius@gmail.com"
.Subject = " Test report from Microsoft Excel Community " & Date & Time
.attachments.Add AWS
.Body = "This is a Test." & vbCrLf & " Please ignore this message "
'The mail is displayed again here
.Display
'Here the mail is immediately placed in the outbox
'Mail.Send
End With
End Sub
At the same time, I can only recommend this site.
I would be happy to know if I could help.
NikolinoDE
Was the answer useful? Mark them as helpful!
This will help all forum participants.