Hi Marrick,
Quote:
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.
|
That's a fairly simple change, really. Replace:
Code:
If InStr(TmpStr, .Text) = 0 Then
iShp.Select
Selection.GoTo What:=wdGoToObject
Selection.MoveRight wdCharacter, 1
Exit Sub
End If
with:
Code:
If InStr(TmpStr, .Text) = 0 Then
iShp.Range.InsertCaption Label:="Figure", TitleAutoText:="", _
Title:="", Position:=wdCaptionPositionBelow, ExcludeLabel:=0
End If
All you need to do now is to add the code for looping through the other story ranges.