Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 10-08-2015, 05:10 PM
macropod's Avatar
macropod macropod is offline selecting shape in header only Windows 7 64bit selecting shape in header only Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,359
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

Since shapes can have names, if you name one (or know the default name Word has allocated to it) you can reference it by that. Alternatively, you can loop through them using code like:
Code:
Dim i As Long
With ActiveDocument.Sections(1).Headers(wdHeaderFooterPrimary)
  For i = 1 To .Shapes.Count
    With .Shapes(i)
      'change a property
    End With
  Next
End With
The problem with looping through a shape collection or referencing them by index #, though, is that the position on-screen doesn't determine the index #; that is determined by where the shape is anchored and what other shapes are anchored at the same position.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Selecting Texts mohsen.amiri Word 5 02-19-2015 11:50 PM
selecting shape in header only Selecting First Columns mohsen.amiri Word Tables 1 09-01-2014 01:08 AM
Can command Advanved Filter do without selecting header(i.e. just process cells)? Aquinax Excel 3 08-10-2013 05:16 PM
selecting shape in header only Excel vba adding field in word table/shape in a header Hdr Excel 1 02-04-2013 04:40 PM
selecting shape in header only locking shape within shape cpwljaw Drawing and Graphics 1 08-28-2012 12:13 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:44 AM.


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