View Single Post
 
Old 05-25-2020, 02:59 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,375
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

If you want to process floating shapes - including any empty paragraphs they're attached to - as well, try:
Code:
Sub Demo()
Application.ScreenUpdating = False
With ActiveDocument
  Do While .Shapes.Count > 0
    .Shapes(1).ConvertToInlineShape
  Loop
  With .Range.Find
    .Execute FindText:="^g^p", ReplaceWith:="", Wrap:=wdFindContinue, Replace:=wdReplaceAll
    .Execute FindText:="^g^l", ReplaceWith:="", Wrap:=wdFindContinue, Replace:=wdReplaceAll
    .Execute FindText:="^g", ReplaceWith:="", Wrap:=wdFindContinue, Replace:=wdReplaceAll
  End With
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote