![]() |
#1
|
|||
|
|||
![]()
Hi all,
I’m fiddling around with shapes in headers. I have 3 sections. Sectionstart is always wdsectionnewpage. Differentfirstpageheaderfooter is always 0 =false Headers are not linked to previous. Every section has 1 shape in header. Now, when I try to count the shapes in primary header of section(1) Activedocument.sections(1).headers(wdheaderfooterp rimary).shapes.count I get 3 instead of 1. Every additional section not linked to previous adds 1 to shapes.count. Help says, shapes are counted for given section only and has example. Where do I go wrong? I want number of shapes in defined header of defined section. Thanks in advance mhagi |
#2
|
||||
|
||||
![]()
Try:
Code:
ActiveDocument.Sections(1).Headers(wdHeaderFooterPrimary).Range.ShapeRange.Count
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
![]()
Hi Paul,
tx again. I'm really sorry I had to come back again. The solution you proposed earlier worked just fine (thanks again!) - until I copied the document to another machine with default environment. The fields ( and I really should have noticed at once) came up with error on printing. I tried to nail down field update on autotext-fields , but got chicken, cause our documents have lots and lots of fields, which need to update. And if I get 1 of those wrong - probabely sky would crash down on my head. So I decided to get back to inserting shapes. But you probabely know how it is with users, long documents, different sections and headers. Ours tend to inserting parts of older documents regardless of sections and headers. Therefore I have to check each section and header type, if logo-shape is already on. And I got really miffed, when I tried out the help-example to count shapes in given header of given section and it did not work. Oh well, life is not easy but we are lucky there are forums where nice people answer stupid questions. Thanks again mhagi |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Possible to Use Styles for Shapes | lostinwebspace | Word | 2 | 04-03-2015 08:04 AM |
All Shapes on slide | excelledsoftware | PowerPoint | 9 | 09-15-2013 04:03 AM |
![]() |
SueK | PowerPoint | 1 | 01-20-2011 04:30 AM |
![]() |
bonani | PowerPoint | 1 | 11-26-2009 06:21 PM |
My Shapes some appear some don't | Jean-Paul | Visio | 0 | 03-01-2006 01:38 AM |