Expertos favor validar esta macro

Expertos tengo la siguiente macro que envía un correo pero estoy tratando que adjunte un archivo el cual esta determinado por una celda, pero este no me funciona, agradeceré lo puedan revisar y guiarme en este proyecto, mi problema esta en esta linea .attachments.Add Range("A34").Value.-

Sub enviar()
Sheets("informe").Unprotect "xxx"
Sheets("informe").Select
Dim Izq As Single, Arr As Single, Ancho As Single, Alto As Single
Dim OutApp As Object
Dim OutMail As Object
Dim ultFil As Long
Dim fec As String
fec = Format(Now, "dd-mmm-yyyy")
Application.DisplayAlerts = False
ActiveWindow.Zoom = 64 'Reduce la hoja para que la imagen quede ajustada al mail
With Range("b1:l26") 'Rango a guardar como imagen
Izq = .Left: Arr = .Top: Ancho = .Width: Alto = .Height: .CopyPicture
End With
With ActiveSheet.ChartObjects.Add(Izq, Arr, Ancho, Alto)
.Chart.Paste
.Chart.Export "D:\control_" & fec & ".jpg" 'directorio en donde guarda la imagen
.Delete
End With
ActiveWindow.Zoom = 80 'Vuelve la hoja a su condición original
Application.DisplayAlerts = True
Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.logon
Set OutMail = OutApp.CreateItem(0)
With OutMail
.To = "xxxxxx@xxxxxxx"
.Subject = "Archivo"
With OutMail
On Error Resume Next
With OutMail
.attachments.Add "D:\control_" & fec & ".jpg"
.BodyFormat = 2 'olFormatHTML
.HTMLBody = "<html>" & _
"<body>" & _
"<p>Señores:</p>" & _
"<p>Favor gestionar...</p>" & _
"<img src='cid:'" & .attachments.Item(1).Filename & "' height=400 width=800>" & _
"</body>" & _
"</html>"
.display
.attachments.Add Range("A34").Value
'End Sub
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
Sheets("informe").Protect "xxx"
End With
End With
End Sub

Añade tu respuesta

Haz clic para o