![]() |
|
#1
|
||||
|
||||
![]() Try the following macro. It will exit at the first uncaptioned inlineshape. Fix that, then re-run to find the next uncaptioned inlineshape, and so on. Code:
Sub FindUncaptionedInlineShape() Dim iShp As InlineShape, Rng As Range, Fld As Field, bCapt As Boolean With ActiveDocument For Each iShp In .InlineShapes Set Rng = iShp.Range.Paragraphs.Last.Next.Range.Paragraphs.Last.Range With Rng If .Fields.Count = 0 Then iShp.Range.Paragraphs.Last.Range.Select Exit Sub Else bCapt = False For Each Fld In .Fields If Fld.Type = wdFieldSequence Then If Split(Trim(Fld.Code.Text), " ")(1) = "Figure" Then bCapt = True: Exit For End If End If Next If bCapt = False Then iShp.Range.Paragraphs.Last.Range.Select Exit Sub End If End If End With Next End With End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#2
|
|||
|
|||
![]()
Ill try it. thanks.
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Marrick13 | Word VBA | 17 | 03-21-2023 07:51 PM |
![]() |
kirkm | Word VBA | 3 | 09-16-2016 11:35 PM |
![]() |
oliboi | Word | 2 | 08-30-2016 02:55 PM |
![]() |
carnestw | Word | 3 | 10-27-2015 12:34 PM |
![]() |
Deepy | Excel | 1 | 02-14-2011 05:06 PM |