Sei sulla pagina 1di 1

�Segue uma bem mais simples:

Sub Parametros()

destino = Sheets(�Plan1�).Range(�C2�).Value
titulo = Sheets(�Plan1�).Range(�C3�).Value
msg = Sheets(�Plan1�).Range(�C4�).Value
Anexo = �W:\Informa��o de Negocio\Lucio\teste.txt�

Call Envia(destino, titulo, msg, Anexo)

MsgBox �Enviado�

End Sub

Public Sub Envia(destino, titulo, msg, Anexo)


Dim OutLook
Dim EmailItem
Dim Email

Set OutLook = CreateObject(�OutLook.Application�)

ATE = Sheets(�Plan1�).Range(�D2�).Value

For x = 1 To ATE
Set Email = OutLook.createItem(EmailItem)

With Email
.To = destino
.Subject = titulo
.body = msg
.Attachments.Add (Anexo)
.send
End With
Set Email = Nothing

Next x

Set OutLook = Nothing

End Sub

Potrebbero piacerti anche