View Single Post
 
Old 08-11-2022, 03:27 AM
Italophile Italophile is offline Windows 11 Office 2021
Expert
 
Join Date: Mar 2022
Posts: 341
Italophile is just really niceItalophile is just really niceItalophile is just really niceItalophile is just really nice
Default

The line
Code:
 .Styles("Caption").ParagraphFormat.KeepWithNext = Not oCaptionsBelowImage.Value
is part of a With block:
Code:
With Application.FileDialog(msoFileDialogFilePicker)
Your code should be:
Code:
ActiveDocument.Styles(wdStyleCaption).ParagraphFormat.KeepWithNext = Not oCaptionsBelowImage.Value
Reply With Quote