Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

Sub PasarDatosaPdf()

'Por.Dante Amor
Application.DisplayAlerts = False
Application.ScreenUpdating = False
Set h2 = Sheets("Hoja2") 'contador
'
celdas = Array("A2", "B2", "C2", "D2", "E2", "F2", "G2")
'
ruta = "C:\Documents and Settings\DAMOR\Mis documentos\Formatos\Hitss\"
nomb = "carta"
ActiveWorkbook.FollowHyperlink ruta & nomb & ".pdf"
'
Application.Wait Now + TimeValue("00:00:03")
For i = LBound(celdas) To UBound(celdas)
DoEvents
SendKeys "{TAB}", True
DoEvents
h2.Range(celdas(i)).Copy
DoEvents
SendKeys "^v", True
DoEvents
Next
'
Application.ScreenUpdating = True
MsgBox "Se enviaron los datos al pdf"
End Sub

You might also like