Results 1 to 1 of 1
2002-10-05, 04:45 #1
- Join Date
- Oct 2002
- Thanked 0 Times in 0 Posts
Word 2000 Shapes/Headers-- Fun Bug... workarounds? (Word 2000)
It's an old problem, but I've been out of the programming loop for a little while... looking to see if anyone has come up with a conceptual answer to this. Here it is:
Counter-intuitively, though individual shapes in the Header/Footer story can be anchored to various sections and header footer objects (primary, even, first)... they are really only "in" the first section. Which is why you can cyle through the shapes collection of the "first" section of a document, and end up getting ALL of the shapes in ALL of the sections of a document.
It doesn't seem to be a huge problem, since you can still write code which will successfully cycle through the sections, add in shapes where you want them to go (in a variety of locations, depending on landscape/portrait and size of paper). Generally you can get what you want.... that is, unless the end-user decides to move one of those boxes around. Once you move a shape around suddenly extra shapes start appearing all over the place. Interestingly enough, you can also make them go away... try this test.
use the code to create footerboxes in a complexly sectioned document (give yourself 4 sections or so, 1 page each).
Then zoom out so you can see all 4 pages, and you'll see you have a footer box in each one.
If you delete any of them, you'll see that there is no footerbox underneath.
Now for the fun:
Start from section one, and move the footer box to the middle of the page.
Do that to each section (2, 3, 4, and so on).
Seems normal, yah?
Now start from section 4, and move the footer boxe to the middle of the page.
Do that to each section, but go backwards this time (3, 2, then 1).
You'll see footer boxes start to appear all over the place!
And, fascinatingly... you can make them disappear by "retracing" your steps.
Now... my supposition is that, for some reason, I'm showing all the shapes (even those in the hidden sections).
But I don't really care whether I'm right... the real question is whether or not textboxes(shape objects) are viable alternatives for the eternal complex footers question (i.e., how to get my text in the "footer" without using the Word designated Footer area-- for whatever reason).
The code is attached... some of it references a class object which references a data-table for different types of footers and their locations... but the basic problem is there if you just plug in some numbers instead of using the class objects.