2
Option Compare Database
Option Explicit
Public Const C_Title As String = "ef3.Cinco"
'Metodos
Public Sub SendMail(obj As MailClass) 'Nome da classe...
Dim appOutLook As Outlook.Application '"Importando" Outlook
Set appOutLook = CreateObject("Outlook.Application")
Dim MailOutLook As Outlook.MailItem 'Propriedades de mensagem
Set MailOutLook = appOutLook.CreateItem(olMailItem)
With MailOutLook
.To = obj.Destinatario 'Destinatários (separados por ';')
.Subject = obj.Assunto 'Assunto
.Body = obj.Detalhe 'Corpo do eMail
.Attachments.Add (obj.Anexo) 'Caminho do anexo
.Send 'Enviar
End With
Set MailOutLook = Nothing
End Sub
I will send the code, but basically if you copy the sheet with the tab you want to send and attach this file is easier.
– Evert