View Single Post
 
Old 04-20-2021, 02:41 PM
macropod's Avatar
macropod macropod is offline Windows 10 Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
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

There is no method to convert all shapes to inlineshapes in a single action. That said, try:
Code:
Sub Test()
Application.ScreenUpdating = False
Dim oSec As Section, oHftr As HeaderFooter, s As Long
For Each oSec In ActiveDocument.Sections
  For Each oHftr In oSec.Headers
    With oHftr
      If .Exists Then
        On Error Resume Next
        For s = .Shapes.Count To 1 Step -1
          .Shapes(s).ConvertToInlineShape
        Next
        On Error GoTo 0
      End If
    End With
  Next
Next
Application.ScreenUpdating = True
End Sub
Do note that, when you convert shapes to inlineshapes, there is no guarantee they will end up in their original positions. Rectifying that would require a considerable coding effort.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote