Te anexo la macro actualizada
Sub enviar_hoja_()
'por.Dante amor
Application.ScreenUpdating = False
Application.DisplayAlerts = False
nombre = ThisWorkbook.Path & "\parte"
Sheets("parte").Copy
ActiveSheet.DrawingObjects("1 Rectángulo").Delete
ActiveWorkbook.SaveAs nombre
n = ActiveWorkbook.FullName
m = ThisWorkbook.Path & "\pronostico.txt"
ActiveWorkbook.Close
Dim Email As CDO.Message
correo = "[email protected]"
passwd = "pwd"
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 = "[email protected]"
.From = correo
.Subject = "parte diario"
.TextBody = "se eleva parte y pronostico."
.AddAttachment n
.AddAttachment m
.Configuration.Fields.Update
On Error Resume Next
.Send
End With
If Err.Number = 0 Then
MsgBox "El mail se envió con éxito"
Else
MsgBox "Se produjo el siguiente error: " & Err.Number & " " & Err.Description
End If
Set Email = Nothing
End Sub
cambia estos datos por tus datos
correo = "[email protected]"
passwd = "pwd"