Hi Paul,
Thanks for this - it works almost as I need it to. I added "iShp.Range.InsertCaption Label:="Figure", TitleAutoText:="", Title:= "", Position:=wdCaptionPositionBelow, ExcludeLabel:=0" after the "iShp.Select" line to actually insert the caption.
However, as you stated, the code stops after finding the first empty paragraph before or after a shape; I need it to continue throughout the document to insert captions for all inline shapes without captions. One could run the code again but once it no longer finds any shapes without captions it just loops endlessly.
I tried modifying your code to insert captions for all uncaptioned shapes without success. Preferably it should loop through all stories in the event a shape or table is in a header, footer, or some other story.
|