bonjour
voici le code
Set xlApp = Application.CreateObject("Excel.Application")
With xlApp
.Visible = True ' This slows your macro but helps during debugging
Set ExcelWkBk = xlApp.Workbooks.Open(PathName & FileName)
Excel.Application.WindowState = xlMinimized
With ExcelWkBk
If Sheets("externe Dokumente").FilterMode Then Sheets("externe Dokumente").ShowAllData
Sheets("externe Dokumente").Outline.ShowLevels RowLevels:=2
le probleme est au niveau du if Sheets("externe Dokumente").