I am in MS Access 2013 trying to set the Reply To address for a olMailItem with Outlook 2013.
My current code is giving me:
Run-time error '287' Application-defined or object-defined error
Private Sub email_button_click()
' *** SETUP OUTLOOK ***
Dim OutApp As Outlook.Application
Dim OutMail As Outlook.MailItem
Set OutApp = New Outlook.Application
Set OutMail = OutApp.CreateItem(olMailItem)
' *** DO SOME OTHER STUFF ****
....
With OutMail
.Subject = "Test"
.Body = "Whatever"
.To = "[email protected]"
.ReplyRecipients.Add "[email protected]" <- Error here
.Display
End With
' *** TIDY UP ***
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
Plenty of others seem to be able to do it. ie :
Change reply address in Outlook mail
http://www.ozgrid.com/forum/showthread.php?t=186882
http://www.vbaexpress.com/forum/archive/index.php/t-19993.html
Thanks
Doug