Saludos Profesor Sergio, de ante mano gracias por responder, realice lo que me sugirió coloque el código donde me indicó, sin embargo me sigue arrojando el mismo error.
' Restaurar formato de fuente
With wsHistorico.Rows("2:2").Font
.ColorIndex = xlAutomatic
.TintAndShade = 0
End With
' Incrementar automáticamente el número de recibo
wsRecibo.Range("J2").Value = wsRecibo.Range("J2").Value + 1
'Corrección de Error en impresión
Application.Wait (Now + TimeValue("0:00:01"))
' Imprimir
wsRecibo.PrintOut Copies:=1, Collate:=True, IgnorePrintAreas:=False
Por
dorgelis, · publicado
Hola
ojala me ayuden con esta macro q en el 2003 funciona perfecto , pero en 2007 se cae al toque
me aparece algo de un error 1004 tiempo ejecución , pero no logro repararla, esto pq me borraran el 2003
y me urge q funcione, es una macro para enviar varios correos con información de excel
la macro es
Private Sub ENVIAR_EMAIL()
Application.ScreenUpdating = False
Application.DisplayAlerts = False ' para q no salga aviso al final
HMAIL.Activate
HSAL.Cells.Clear
HMAIL.Cells.Copy HSAL.Cells
'Workbooks(L3).SaveCopyAs ThisWorkbook.Path & "\LOCAL " & COL.List(x, 0) & ".xls"
ActiveWorkbook.EnvelopeVisible = True 'permite enviar mas de 1 correo a la vez 'aca se cae!!
With ActiveSheet.MailEnvelope
'.Introduction = "Estimado Sr. " & COL.List(x, 4)
.Introduction = COL.List(x, 4) & Chr(13) & "Adjunto avances" & Chr(13) & _
"gestión"
.Item.To = COL.List(x, 2) 'Destinatario
'.Item.Subject = COL.List(x, 0) & "-" & COL.List(x, 1) 'Asunto
.Item.Subject = "Avance" 'Asunto
For n = 3 To 100
If Cells(n, 2) = "" And Cells(n, 8) <> "" Then
Cells(n + 1, 2) = "contactarse con" & Chr(10) & "pp" & Chr(10) & "Atentamente," & Chr(10) & "Gerencia"
Cells(n + 1, 2).HorizontalAlignment = xlLeft
'Cells(n + 2, 2).VerticalAlignment = xlCenter
'Cells(n + 2, 2).WrapText = True
Else
End If
Next n
Columns("A:j").Select
Columns("A:j").EntireColumn.AutoFit
.Item.Send 'enviamos el mail
End With
gracias
oliver