Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #8  
Old 11-09-2017, 10:52 PM
macropod's Avatar
macropod macropod is offline Checking Captions Windows 7 64bit Checking Captions Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Checking Captions VBA to insert captions without appending to existing captions Marrick13 Word VBA 17 03-21-2023 07:51 PM
Checking Captions Spell checking kirkm Word VBA 3 09-16-2016 11:35 PM
Checking Captions Some captions getting screwed up when fixing other captions oliboi Word 2 08-30-2016 02:55 PM
Checking Captions Captions: Changing captions in Appendix update all captions carnestw Word 3 10-27-2015 12:34 PM
Checking Captions Help with checking available times Deepy Excel 1 02-14-2011 05:06 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:24 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft