View Full Version : [SOLVED:] Outlook email with fillable fields
austenr
06-19-2019, 02:04 PM
I am not very good at outlook and am looking for some advice on how to proceed or an example from the web.
I am having to send a lot of emails for different customers and the ones I inherited are text fields with XXXXXXX for name and XXXXXXX for amount. Is there a way to have some sort of field in the body of the email where you can just have a space to enter the name and amount without having to remove the XXXXX with the delete key and then enter the information.
I seem to have seed something a long time ago with that but I think it might have been a PDF.
Any help or direction appreciated.
gmayor
06-19-2019, 08:03 PM
Put your list of customers and amounts in an Excel worksheet and you could use mail merge to e-mail. Copy the message to a Word document and replace the Xs with merge fields from your Excel file.
I suspect that you may find https://www.gmayor.com/ManyToOne.htm useful - probably in one to one mode.
Logit
06-20-2019, 08:22 AM
.
Option Explicit
Sub eMail()
Dim lRow As Integer
Dim i As Integer
Dim toDate As Date
Dim toList As String
Dim eSubject As String
Dim eBody As String
Dim OutApp
Dim OutMail
With Application
.ScreenUpdating = False
.EnableEvents = False
.DisplayAlerts = False
End With
Sheets(1).Select
lRow = Cells(Rows.Count, 4).End(xlUp).Row
For i = 2 To lRow
If Cells(i, 5) = "" Then
If (Cells(i, 1)) = 1 Then
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
toList = Cells(i, 2) 'gets the recipient from col D
eSubject = Cells(i, 3)
eBody = Cells(i, 4)
On Error Resume Next
With OutMail
.To = toList
.CC = ""
.BCC = ""
.Subject = eSubject
.Body = eBody
.Display ' ********* Creates draft emails. Comment this out when you are ready
' .Send '********** UN-comment this when you are ready to go live
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
Cells(i, 5) = "Mail Sent " & Date + Time 'Marks the row as "email sent in Column A"
End If
End If
Next i
ActiveWorkbook.Save
Sheets(2).Select
With Application
.ScreenUpdating = True
.EnableEvents = True
.DisplayAlerts = True
End With
End Sub
austenr
06-20-2019, 09:34 AM
Thanks. I'll give it a try.
Logit
06-20-2019, 12:56 PM
.
You are welcome.
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.