Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word, Automate section breaks and header/footer? 1

Status
Not open for further replies.

PaulNeubauer

Programmer
Feb 28, 2007
11
US
Hi folks,

I'm creating a large(ish) document that will have a large, but unknown number of sections. Each section will break at a heading (mostly Heading 2, but also Heading 1). The Heading2 and Heading 1 styles are set up with a "Page Break Before", but I can't seem to find a way to set the style to specify a "Section Break Before". Many of the sections will be several pages long so I want the footers to display useful navigation information, specifically, the section's title text.

It's computer system documentation and the Heading2's may look something like:
3.2 Data Source 2 --- BlahBlahBlah

and then I want the footer for the corresponding section to repeat the text "Data Source 2 --- BlahBlahBlah"

Obviously, I know how to get the "3.2" part autonumbered and I expect I can live with the "2" in "Data Source 2" being handled manually, especially since I have to do the "BlahBlahBlah" part manually, but I'd really like to be able to drop in a copy of the template for the section (I'll actually have several different section templates, of which Data Source is one), change the heading text and have the footer autoupdate when I update other fields like the TOC.

I have done something like this before using Word and I had to insert every single section break individually (from the "insert" menu) and insert every footer cross-reference individually, after individually breaking the "Same as previous" link for the footer. Somehow, that seems like it ought not to be necessary. It certainly was not necessary back when I used LaTeX. I know Word is just a "word processor" and not a real document-management system, but it still seems like I must be missing something. Am I?

Thanks,
Paul
 
Why do you want to have so many sections? If it's just to get the footers you mention then take a look at STYLEREF fields.

If you really do need the sections I don't think there's any easy way to automate it.

Enjoy,
Tony

------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.

Professional Office Developers Association
 
I had never heard of styleref before and when I googled for how to change the text of headers or footers for different parts of the document, I only found claims that you absolutely had to have section breaks. I will absolutely look at styleref. A quick google for styleref so far makes me think that styleref looks like just what I need and that all those other sites like or are way out of line for what they claim they are answering.

Thanks, Tony!

Paul
 
A fairly simple macro could - I think, if I understand this correctly - do this. Have it create a Section break, change all headers/footers to NOT Same as previous, and go on from there.

A style does not have a "Section break before" option, although that would not be a bad idea.

faq219-2884

Gerry
My paintings and sculpture
 
Thanks, fumei.

I think styleref may be a LOT simpler and probably better for what I'm looking for, though.

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top