VBA send mail med body-variabel
Jeg bruger nedenstående kode til at sende en mail med vedhæftet fil, men kunne godt tænke mig at få en lagt en variabel fra celle B5 ind i "Body" i mailen. Hvordan skal koden se ud?Sub SendPost()
If Application.MailSystem <> xlNoMailSystem Then
ActiveSheet.Copy
With ActiveWorkbook
.SendMail _
Recipients:="xx@xxx.dk", _
Subject:="Fakturakladde"
.Close SaveChanges:=False
End With
Application.MailLogoff
Else
MsgBox "Intet Microsoft postsystem er installeret.", vbInformation, "Postmeddelelse"
End If
MsgBox "Mail sendt til YYY"
End Sub
