G
Guest
I currently have a mailing macro that references one cell for the message.
We are trying to put more information into the body of the outlook mail
message by selecting multi cells. I have found code on the web that uses the
ActiveWorkbook.EnvelopeVisible=True object. The problem I'm having is that I
get a run-time error 1004 "Method 'EnvelopeVisible' of object'_workbook'
Failed".
I have searched for an answer to my run-time error, but not finding
anything. Any help would be greatly appreciated. Below is the coding.
Sub Send_Range()
' Select the range of cells on the active worksheet.
ActiveSheet.Range("D5:G15").Select
' Show the envelope on the ActiveWorkbook.
ActiveWorkbook.EnvelopeVisible = True
' Set the optional introduction field thats adds
' some header text to the email body. It also sets
' the To and Subject lines. Finally the message
' is sent.
With ActiveSheet.MailEnvelope
.Introduction = "This is a sample worksheet."
.Item.To = "(e-mail address removed)"
.Item.subject = "My subject"
.Item.Send
End With
End Sub
We are trying to put more information into the body of the outlook mail
message by selecting multi cells. I have found code on the web that uses the
ActiveWorkbook.EnvelopeVisible=True object. The problem I'm having is that I
get a run-time error 1004 "Method 'EnvelopeVisible' of object'_workbook'
Failed".
I have searched for an answer to my run-time error, but not finding
anything. Any help would be greatly appreciated. Below is the coding.
Sub Send_Range()
' Select the range of cells on the active worksheet.
ActiveSheet.Range("D5:G15").Select
' Show the envelope on the ActiveWorkbook.
ActiveWorkbook.EnvelopeVisible = True
' Set the optional introduction field thats adds
' some header text to the email body. It also sets
' the To and Subject lines. Finally the message
' is sent.
With ActiveSheet.MailEnvelope
.Introduction = "This is a sample worksheet."
.Item.To = "(e-mail address removed)"
.Item.subject = "My subject"
.Item.Send
End With
End Sub