Como hacer que esta macro guarde en pdf?
Sub CorrespondenciaConWord()
'Por.Dante Amor
    '
    patharch = ThisWorkbook.Path & "\plantilla1.dotx"
    '
    For i = 2 To Range("A" & Rows.Count).End(xlUp).Row
        Set objWord = CreateObject("Word.Application")
        objWord.Visible = True
        objWord.documents.Add Template:=patharch, NewTemplate:=False, DocumentType:=0
        '
        For j = 1 To Cells(1, Columns.Count).End(xlToLeft).Column
            textobuscar = Cells(1, j)
            objWord.Selection.Move 6, -1
            objWord.Selection.Find.Execute FindText:=textobuscar
            '
            While objWord.Selection.Find.found = True
                objWord.Selection.Text = Cells(i, j) 'texto a reemplazar
                objWord.Selection.Move 6, -1
                objWord.Selection.Find.Execute FindText:=textobuscar
            Wend
            '
        Next
        '
        ObjWord. Activate
        ObjWord. ActiveDocument.SaveAs Cells(i, "A").Value
        objWord. ActiveDocument. Close
 objWord. Quit
    Next
End Sub
            
            
            
        1 Respuesta
                    Respuesta de Dante Amor                
                
        
        
            
                2
              
        
        
        
            
            
        
    
                


