erro no ActiveSheet.MailEnvelope
Enviado: 01 Jun 2017 às 00:41
boa noite
estou enviando um email automatico com os comandos abaixo, mas esta com erro na seguinte linha " With ActiveSheet.MailEnvelope"
segue comando..
estou enviando um email automatico com os comandos abaixo, mas esta com erro na seguinte linha " With ActiveSheet.MailEnvelope"
segue comando..
Código: Selecionar todos
Agradeço a ajuda,Private Sub Image3_Click()
' Select the range of cells on the active worksheet.
Sheets("Banco de Horas").Select
ActiveSheet.Range("A1:L42").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.
ActiveWorkbook.EnvelopeVisible = True
With ActiveSheet.MailEnvelope
.Introduction = "Banco de Horas"
.Item.To = ""
.Item.CC = ""
.Item.Send
End With
End Sub