Sub PDF_Excel()
'se lance par les touches Ctrl+E
Dim chemin$, wb As Workbook
chemin = ThisWorkbook.Path & Application.PathSeparator 'à adapter
Application.ScreenUpdating = False
For Each wb In Workbooks
If wb.Name <> ThisWorkbook.Name Then _
wb.Worksheets(1).ExportAsFixedFormat xlTypePDF, chemin & Left(wb.Name, InStrRev(wb.Name, ".") - 1) & ".pdf", _
Quality:=xlQualityMinimum, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
Next
End Sub
Sub PDF_Word()
'se lance par les touches Ctrl+W
Dim chemin$, Wapp As Object, doc As Object
chemin = ThisWorkbook.Path & Application.PathSeparator 'à adapter
On Error Resume Next
Set Wapp = GetObject(, "Word.Application")
For Each doc In Wapp.Documents
doc.ExportAsFixedFormat chemin & Left(doc.Name, InStrRev(doc.Name, ".") - 1) & ".pdf", 17 'wdExportFormat
Next
End Sub