Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 04-20-2021, 02:41 PM
macropod's Avatar
macropod macropod is offline Help with select all Shapes in headers Windows 10 Help with select all Shapes in headers Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,521
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
 

Tags
headers; help, textboxes



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with select all Shapes in headers Control A does not select some footers and some headers Photon Word 5 04-20-2019 04:22 AM
Help with select all Shapes in headers How to see what shapes have been used ascheler Visio 1 07-08-2016 03:54 PM
Help with select all Shapes in headers Headers - Find text, Select, Pass value to Varable BrotherDude Word VBA 4 07-15-2015 05:42 PM
Help with select all Shapes in headers Can't select shapes via macro TishyMouse Word VBA 3 04-13-2012 03:26 AM
My Shapes some appear some don't Jean-Paul Visio 0 03-01-2006 01:38 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:17 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft