Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-20-2021, 10:16 AM
Cendrinne's Avatar
Cendrinne Cendrinne is offline Help with select all Shapes in headers Windows 10 Help with select all Shapes in headers Office 2019
Competent Performer
Help with select all Shapes in headers
 
Join Date: Aug 2019
Location: Montreal Quebec Canada
Posts: 200
Cendrinne is on a distinguished road
Default Help with select all Shapes in headers

Hello pros,
I need your insights



This is following a former thread of mine, regarding Shapes in headers.

What I'm trying to do now is to select them all and convert them to inline shape.
Cause at times, when I've converted a PDF to Word, it gives me a bunch of different types of Textboxes in headers and at times footers.

I have a wonderful Script to extract the content of the Headers, however, if in other than Inline or if they are different, it or they get's deleted. So I loose my texts.

My Test, in a Header, I've put a 7 Text box (1 under each other), for every Wrape Type there is. In this test, it's the only Header, so Primary. It might be different in live documents though.

I found a script but modified it, cause I got an error message on the line of Convert to InlineShape. Maybe because a Shape was already Inline Shape, so the reason i've added, if wrapType is not inline, then convert to inline. Now I'm getting NO errors but it doesn't do anything

Code:
     Dim oSec As Section
     Dim oHftr As HeaderFooter
     Dim i As Integer
     Dim oShp As Shapes

     For Each oSec In ActiveDocument.Sections
         For Each oHftr In oSec.Headers
           If oHftr.Exists Then
             For i = oHftr.range.ShapeRange.Count To 1 Step -1
             
               If oShpWrapType <> wdWrapMergeInline Then
               oHftr.range.ShapeRange.ConvertToInlineShape
               End If
         
             Next i
           End If
         Next oHftr
     Next oSec

    On Error GoTo 0
So either this can be fixed or have a way to Select all Shapes/textboxes in all Headers, so I can modify it manually in one shot, instead of manually changing them one at the time.

Am I asking the impossible you think?

Any advice, or insights would be sooooo greatly be appreciated

Cendrinne
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 04:12 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