View Single Post
 
Old 02-15-2012, 10:52 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,384
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

Hi Marrick,

Word captions are inserted using the Caption Style. So, in general terms, you should look to see if the first non-empty paragraph before/after the inlineshape (depending on wheter the captions should be above/below) is in that Style. If so, you can probably safely not insert a caption for that inlineshape.

Edit: Here's some code I posted in another forum. It finds the first Inlineshape without a Caption, then exits after scrolling to the Shape concerned.
Code:
Sub FindUncaptionedShape()
Dim oCap As CaptionLabel, iShp As InlineShape, TmpRng As Range, TmpStr As String
For Each oCap In CaptionLabels
  TmpStr = TmpStr & CaptionLabels(oCap) & " "
Next
With ActiveDocument
  For Each iShp In .InlineShapes
    Set TmpRng = iShp.Range.Words.Last
    With TmpRng
      Do While Len(.Text) = 1
        .MoveEnd wdWord, 1
        .MoveStart wdWord, 1
      Loop
      If InStr(TmpStr, .Text) = 0 Then
        iShp.Select
        Selection.GoTo What:=wdGoToObject
        Selection.MoveRight wdCharacter, 1
        Exit Sub
      End If
    End With
  Next
End With
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote