Finding the graphics and inserting the keyword
Hi,
I am looking for some help in writing the vba macro to find all the figures in the word document and insert a line just above the each graphics in the work document.
Sub Macro1()
'
' Macro1 Macro
'
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "^g"
'.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Like in this code it is able to find all the graphics but we dont want to replace the graphics, we want to keep them and add the line.
Thanks in advance.
|