I am in MS Access 2013 trying to set the Reply To address for a olMailItem with Outlook 2013. (https://msdn.microsoft.com/en-us/library/office/ff862985.aspx)
My current code is giving me:
Run-time error '287' Application-defined or object-defined error
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
AG
My current code is giving me:
Run-time error '287' Application-defined or object-defined error
Code:
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 = "test@test.com"
.ReplyRecipients.Add "notatest@test.com" <- 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
AG