bshawnr
New Member
I was using the below code in Excel 2003 and it worked with no problem. Now I have Excel 2010 and get "Run-time error '287' Application defined or object defined error.
Here is the code:
ActiveWorkbook.Names.Add Name:="EmailBody",RefersToR1C1:="=Email!R38c13:r100c15"
Application.Goto Reference:="EmailBody"
ActiveWorkbook.EnvelopeVisible = True
With ActiveSheet.MailEnvelope
.Introduction = ""
.Item.To = *Email address here**
.Item.Subject = Range("o35").Value
.Item.Send
End With
It errors out when it gets to the .Item.Send line.
Does anyone know what the issue could be? Thanks.
Here is the code:
ActiveWorkbook.Names.Add Name:="EmailBody",RefersToR1C1:="=Email!R38c13:r100c15"
Application.Goto Reference:="EmailBody"
ActiveWorkbook.EnvelopeVisible = True
With ActiveSheet.MailEnvelope
.Introduction = ""
.Item.To = *Email address here**
.Item.Subject = Range("o35").Value
.Item.Send
End With
It errors out when it gets to the .Item.Send line.
Does anyone know what the issue could be? Thanks.