Hi all,
I am trying to set the reply to address based on a value in the mailmerge - I have sucesfully done this for the address but cant get the .replyrecipient to work.
I have attached the extract from the code that has the email properties. They all work except for the reply to.
Any feedback appreicated.
The bigger picture of the macro is that individual emails are sent with their unique PDF attached, I jsut want the Reply to send to the teacher as i send the emails on behalf of many other people.
THanks!
'Create an Outlook object and new mail message
Set OutlookApp = CreateObject("Outlook.Application")
Set OutlookMail = OutlookApp.CreateItem(0)
'Display email and specify To, Subject, etc
With OutlookMail
EmailTo = .DataFields("StudentNumber")
ReplyToTeachers = .DataFields("Teacher")
.Display
.To = EmailTo
.Subject = EmailSubject
.Attachments.Add PDFUpload
.ReplyRecipients = ReplyToTeachers
If DisplayEmail = False Then
.send
Else
'.send
End If
End With