![]() |
|
#1
|
||||
|
||||
![]()
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
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#2
|
|||
|
|||
![]()
Hi,
thanks for your answer. Could you give me a hint, how to address a shape anchored to a specific paragraph with a specific format. Aim of the macro is a) to insert Company logo in Header (and footer) if printing in pdf b) delete/hide logos in Header and footer if printing on Company paper and this thru all sections with different page layout and whatever. And - there could be additional shapes if users include 3rd Party logos in documents and those not be deleted at all. I could go thru all the shapes and identify my search object(s) by height or width, but was looking for an easier solution. I'm not really THE vba expert and lazy as hell - always hoping WWW has a solution i can understand ("dim objects" are the high of my know how, so nothing above that! ![]() And I hoped it would be possible to only work with headers or footers. Now I have to look at both and I'm afraid, this will slow the macro down a lot. Thanks nonetheless |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Selecting Texts | mohsen.amiri | Word | 5 | 02-19-2015 11:50 PM |
![]() |
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 |
![]() |
Hdr | Excel | 1 | 02-04-2013 04:40 PM |
![]() |
cpwljaw | Drawing and Graphics | 1 | 08-28-2012 12:13 AM |