![]() |
|
#1
|
||||
|
||||
![]()
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] |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
bcarlier | Word Tables | 17 | 05-10-2014 02:36 PM |
Captions/Styles | NWoffice | Word | 5 | 10-06-2011 10:26 AM |
![]() |
gib65 | Word | 2 | 08-12-2011 01:25 PM |
![]() |
mcjohn | Word | 1 | 02-11-2010 10:36 PM |
Captions | dwilliams | Word | 0 | 10-07-2009 08:30 AM |