Solved Generate Draft Email From Recordset For User To Review Before Sending (1 Viewer)

LGDGlen

Member
Local time
Today, 17:03
Joined
Jun 29, 2021
Messages
229
Hi All

I have previously setup some VBA within an Excel sheet that builds and email from sheet data and sends it out to a set of recipients so I understand the VBA code necessary to build an email.

The issue is that at the time of generating an email the user needs to do a review of the email before sending and possibly add extra recipients.

What I want to do is generate the email and open it instead of just blindly sending it. So is there a way to do this. Currently I have:

Dim OutApp As Object, OutMail As Object, HeaderValue As String
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
' generate HtmlContent section
With OutMail
.To = "user1@test.com"
.Cc = "user2@test.com;user3@test.com"
.Subject = "Records From The Database"
.HTMLBody = HtmlContent
.Send
End With

Where HtmlContent is built up from the record set data. So instead of the .Send step at the end i want open the generated email for the user to review before sending. is there a ".Open" for example

Thanks in advance.

Kind regards

Glen
 

Users who are viewing this thread

Top Bottom