Bilder in Word mit automatischer Nummerierung und Dateiname als Titel einfügen – VBA Script

Sub InsertImagesWithCaptions()

Dim fso, d1, file, fileName
Set fso = CreateObject("Scripting.FileSystemObject")
fileName = "D:\temp\bilder"
' Pfad anpassen
Set d1 = fso.GetFolder(fileName)
For Each file In d1.Files
Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
Selection.TypeParagraph
Selection.InlineShapes.AddPicture fileName:= _
file, LinkToFile:=True, SaveWithDocument:=False
Selection.TypeParagraph

Selection.InsertCaption Label:="Abbildung", TitleAutoText:="", Title:=" - " + file, _
Position:=wdCaptionPositionBelow, ExcludeLabel:=0
Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
Selection.TypeParagraph
Next
End Sub