Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Arq Gestor Email
- 325.txt AA test@email.com
- 326.txt AB test@email.com
- 328.txt AB test@email.com
- 327.txt AC test@email.com
- i = 1
- Dim anexo As String
- anexo = ""
- While Lista.Cells(i, 5).Value <> ""
- destino = Lista.Cells(i, 3).Value
- gestor = Lista.Cells(i, 2).Value
- arquivo = Lista.Cells(i, 1).Value
- anexo = Caminho & arquivo
- Call SendAttach(anexo, Lista, gestor, destino, antecipado, i)
- i = i + 1
- Wend
- Set olApp = Outlook.Application
- Set olMsg = olApp.CreateItem(0) ' email
- Set olAtt = olMsg.Attachments
- olAtt.Add (anexo)
- ' send message
- With olMsg
- .Subject = "Movimentação Gestor " & gestor
- .To = destino
- .HTMLBody = "Segue em anexo a movimentação do gestor " & gestor & corpo & "."
- .Send
- End With
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement