16 lines
428 B
Plaintext
16 lines
428 B
Plaintext
'VBA code:
|
|
Sub EnviarCorreo()
|
|
Dim OutlookApp As Object
|
|
Dim OutlookMail As Object
|
|
Set OutlookApp = CreateObject("Outlook.Application")
|
|
Set OutlookMail = OutlookApp.CreateItem(0)
|
|
With OutlookMail
|
|
.To = "recipient@domain.com"
|
|
.Subject = "Mail subject"
|
|
.Body = "This is the body of the email."
|
|
.Send
|
|
End With
|
|
Set OutlookMail = Nothing
|
|
Set OutlookApp = Nothing
|
|
End Sub
|