¿que es una macro? perdón...
un procedimiento almacenado en WOrd o excel, también lo puedes hacer desde consola (CMD) y se llama un ejecutable o .BAT
para excel-word seria asi:
Sub simpleXlsMerger()
Application.ScreenUpdating = False
Dim bookList As Workbook
Dim mergeObj As Object, dirObj As Object, filesObj As Object, everyObj As Object
Application.ScreenUpdating = False
Set mergeObj = CreateObject("Scripting.FileSystemObject")
'CAMBIAR RUTA PARA elegir los documentos requeridos
Set dirObj = mergeObj.Getfolder("C:\Users\PONER ACA LA RUTA COMPLETA DE LA CARPETA")
Set filesObj = dirObj.Files
For Each everyObj In filesObj
Set bookList = Workbooks.Open(everyObj)
ChDir "dirObj"
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"dirObj &" \ " bookList ", Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _
True
bookList.Close
Next
Application.ScreenUpdating = True
End Sub