Thread: Script to send
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
jenelle jenelle is offline
external usenet poster
 
Posts: 11
Default Script to send

The following code is from a KB article. It works as is, except cell block
displays black(with white lines) in the Outlook email. How do I make the data
visible? Also, how to set Range = cells that the user has highlighted rather
than A1:C10?

Sub Send_Range()

' Select the range of cells on the active worksheet.
'ActiveSheet.Range ("A1:C10").Select

' Show the envelope on the ActiveWorkbook.
ActiveWorkbook.EnvelopeVisible = True

' Set the optional introduction field thats adds 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 of data from my worksheet."
.Item.To = "jenellea"
.Item.Subject = "Selection from Excel Workbook"
.Item.Send
End With
End Sub