Waterpolo1
New Member
- Joined
- Sep 8, 2015
- Messages
- 21
Context
The code below allows or me to send an email once I click submit. It works fine on Microsoft Excel 2010 but gives a 'run time error 287' on Microsoft Excel 2013 - Please help!!
Dim myApp As Outlook.Application, myMail As Outlook.MailItem
Set myApp = New Outlook.Application
Set myMail = myApp.CreateItem(olMailItem)
myMail.To = TBEmail.Value
With myMail
.Subject = "Your issue has been submitted and your ID number is" & " " & TBID.Value
.Body = "Thank you for submitting your issue. " & vbCrLf & "We will log and review this issue amongst the wider team." _
& vbCrLf & "Please quote your Issue ID, number" & " " & TBID.Value & ", " & "in any future correspondence." _
.Send
End With
The code below allows or me to send an email once I click submit. It works fine on Microsoft Excel 2010 but gives a 'run time error 287' on Microsoft Excel 2013 - Please help!!

Dim myApp As Outlook.Application, myMail As Outlook.MailItem
Set myApp = New Outlook.Application
Set myMail = myApp.CreateItem(olMailItem)
myMail.To = TBEmail.Value
With myMail
.Subject = "Your issue has been submitted and your ID number is" & " " & TBID.Value
.Body = "Thank you for submitting your issue. " & vbCrLf & "We will log and review this issue amongst the wider team." _
& vbCrLf & "Please quote your Issue ID, number" & " " & TBID.Value & ", " & "in any future correspondence." _
.Send
End With