Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
19
Task/Send-email/VBA/send-email.vba
Normal file
19
Task/Send-email/VBA/send-email.vba
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
Option Explicit
|
||||
Const olMailItem = 0
|
||||
|
||||
Sub SendMail(MsgTo As String, MsgTitle As String, MsgBody As String)
|
||||
Dim OutlookApp As Object, Msg As Object
|
||||
Set OutlookApp = CreateObject("Outlook.Application")
|
||||
Set Msg = OutlookApp.CreateItem(olMailItem)
|
||||
With Msg
|
||||
.To = MsgTo
|
||||
.Subject = MsgTitle
|
||||
.Body = MsgBody
|
||||
.Send
|
||||
End With
|
||||
Set OutlookApp = Nothing
|
||||
End Sub
|
||||
|
||||
Sub Test()
|
||||
SendMail "somebody@somewhere", "Title", "Hello"
|
||||
End Sub
|
||||
Loading…
Add table
Add a link
Reference in a new issue