Hey guys,
Am using the following code to save mails in the draft through VBA (mainly to avoid annoying malware prompt).
How do you send a saved mail in draft through VBA??
Am using the following code to save mails in the draft through VBA (mainly to avoid annoying malware prompt).
How do you send a saved mail in draft through VBA??
Code:
Sub Mail_Workbook_1()
Dim OutApp As Object
Dim OutMail As Object
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
Bod = Range("A1").Value
With OutMail
.To = "xxxx&xxx.com"
.CC = ""
.BCC = ""
.Subject = "This is the Subject line"
.Body = "Body"
.Attachments.Add
.Save
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
End Sub