Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Sub DeleteCaptions()
Dim oCap As CaptionLabel
Dim iShp As InlineShape
Dim i As Integer
Dim TmpRng As Range
Dim TmpStr As String
For Each oCap In CaptionLabels
TmpStr = TmpStr & CaptionLabels(oCap) & " "
Next
With ActiveDocument
For Each iShp In .InlineShapes
i = 0
Set TmpRng = iShp.Range.Words.Last
With TmpRng
Do While Len(.Text) = 1
i = i - 1
.MoveEnd wdWord, 1
.MoveStart wdWord, 1
Loop
MsgBox .Text
If InStr(TmpStr, .Text) > 0 Then
.MoveEnd wdWord, 1
.MoveStart wdWord, i
.Delete
End If
End With
Next
End With
End Sub
Dim oPara As Paragraph
For each oPara in ActiveDocument.Paragraphs
If oPara.Range.Style = "Caption" Then
oPara.Range.Delete
End If
Next
iShp.Range.Words.Last