Macro para guardar "EnviarPara".
Sub MandaEmail()
Dim EnviarPara As String
EnviarPara = Sheets("email").Cells(i, 32)
Call Envia_Emails EnviarPara
...
end sub
Macro para enviar email.
Sub Envia_Emails(EnviarPara As String)
Application.Calculation = xlCalculationManual
Application.ScreenUpdating = False
Range(Cells(1, 1), Cells(26, 8)).Select
With Selection.Font
.Name = "Calibri"
.Size = 12
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
'.Underline = xlUnderlineStyleSingle
'.ColorIndex = 3
.TintAndShade = 0
.ThemeFont = xlThemeFontMinor
End With
Columns("D:D").EntireColumn.AutoFit
ActiveWorkbook.EnvelopeVisible = True
With ActiveSheet.MailEnvelope
'Format(Range("B6"), "ddmmyyyy")
'Application.CutCopyMode = False
Dia = Range("B6")
.Item.To = EnviarPara
.Item.CC = ""
...
end sub
Postado : 10/01/2018 1:03 pm