Página 1 de 1

erro no ActiveSheet.MailEnvelope

Enviado: 01 Jun 2017 às 00:41
por ThiagoN
boa noite

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
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
Agradeço a ajuda,

Re: erro no ActiveSheet.MailEnvelope

Enviado: 05 Jun 2017 às 15:59
por alexandrevba
Boa tarde!!

Qual o código e mensagem do erro?

Eu não tive problemas!


Att