Te anexo una macro para enviar correo en Excel por Gmail:
Sub EnviarPorGmail()
'Por.Dante Amor
Dim Email As CDO.Message
correo = "[email protected]"
passwd = "pwd"
For i = 2 To Range("A" & Rows.Count).End(xlUp).Row
Set Email = New CDO.Message
Email.Configuration.Fields(cdoSMTPServer) = "smtp.gmail.com"
Email.Configuration.Fields(cdoSendUsingMethod) = 2
With Email.Configuration.Fields
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = CLng(465)
.Item("http://schemas.microsoft.com/cdo/" & "configuration/smtpauthenticate") = Abs(1)
.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 30
.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = correo
.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = passwd
.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True
End With
With Email
.To = Cells(i, "A")
.From = correo
.Subject = Cells(i, "B")
.TextBody = Cells(i, "C")
.AddAttachment Cells(i, "E") & Cells(i, "D")
.Configuration.Fields.Update
On Error Resume Next
.Send
End With
If Err.Number = 0 Then
Cells(i, "F") = "El mail se envió con éxito"
Else
Cells(i, "F") = "Se produjo el siguiente error: " & Err.Number & " " & Err.Description
End If
Set Email = Nothing
Next
End Sub
Revisa la imagen para que veas cómo tienes que acomodar los datos
Comentario borrado por el autor - Miguel Angel