Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub Send_Emails()
- Dim OutApp As Object: Set OutApp = CreateObject("Outlook.Application")
- Dim OutMail As Object: Set OutMail = OutApp.CreateItem(0)
- 'Send Email
- With OutMail
- .to = "john.doe@mycompany.com"
- .Subject = "This is the Subject"
- .Body = "This is message"
- .Display
- End With
- On Error Resume Next:
- OutMail = Nothing
- OutApp = Nothing
- End Sub
- Sub Send_Five_Emails()
- For i = 1 To 5 'Send email 5 times
- Call Send_Emails
- Next i
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement