StyleRef Field in Headers to Show Chapters/Sections

C

c j

New to fields...I want my headers to show chapters on the even page and sections in the odd pages.

When I put a simple StyleRef field in I'm not getting what I want...here is what I would like it to do:

- if a chapter has not started yet (as in the preface pages) then I would like it to be blank rather than picking up the chapter that will be 10 pages later.

- same with the section

I guess I'd like both to search starting from the bottom of the page the field is currently on...and go backwards through the document to the most recently started chapter/section.

I'm sure this can be done but I have searched the ends of the web. (j/k, but I can't find it through Google).


Submitted via EggHeadCafe - Software Developer Portal of Choice
More Fun with Fluent NHibernate Automapping
http://www.eggheadcafe.com/tutorial...9-81ee42171b00/more-fun-with-fluent-nhib.aspx
 
C

c j

Also, chapter headings always start on a new page. I would ideally like there to be no header on pages that start a chapter.

In addition to the styleref, I also have a horizontal line in the header. Is there some conditional formatting that can control the horizontal line?

And what is the conditional to add to the styleref to have it return blank if it's the page the chapter starts on (in addition to the conditional I need from the first part of this thread).

Ha, am I asking for too much? Is this unrealistic?



c j wrote:

StyleRef Field in Headers to Show Chapters/Sections
25-Feb-10

New to fields...I want my headers to show chapters on the even page and sections in the odd pages.

When I put a simple StyleRef field in I'm not getting what I want...here is what I would like it to do:

- if a chapter has not started yet (as in the preface pages) then I would like it to be blank rather than picking up the chapter that will be 10 pages later.

- same with the section

I guess I'd like both to search starting from the bottom of the page the field is currently on...and go backwards through the document to the most recently started chapter/section.

I'm sure this can be done but I have searched the ends of the web. (j/k, but I can't find it through Google).

Previous Posts In This Thread:


Submitted via EggHeadCafe - Software Developer Portal of Choice
WPF Custom Validation Using the Enterprise Library
http://www.eggheadcafe.com/tutorial...c-33ef1ec7d1a3/wpf-custom-validation-usi.aspx
 
C

c j

Also, chapter headings always start on a new page. I would ideally like there to be no header on pages that start a chapter.

In addition to the styleref, I also have a horizontal line in the header. Is there some conditional formatting that can control the horizontal line?

And what is the conditional to add to the styleref to have it return blank if it's the page the chapter starts on (in addition to the conditional I need from the first part of this thread).

Ha, am I asking for too much? Is this unrealistic?



c j wrote:

StyleRef Field in Headers to Show Chapters/Sections
25-Feb-10

New to fields...I want my headers to show chapters on the even page and sections in the odd pages.

When I put a simple StyleRef field in I'm not getting what I want...here is what I would like it to do:

- if a chapter has not started yet (as in the preface pages) then I would like it to be blank rather than picking up the chapter that will be 10 pages later.

- same with the section

I guess I'd like both to search starting from the bottom of the page the field is currently on...and go backwards through the document to the most recently started chapter/section.

I'm sure this can be done but I have searched the ends of the web. (j/k, but I can't find it through Google).

Previous Posts In This Thread:


Submitted via EggHeadCafe - Software Developer Portal of Choice
Dr. Dotnetsky's Cool .Net Tips and Tricks No. 26
http://www.eggheadcafe.com/tutorial...be30-cde5d852348d/dr-dotnetskys-cool-net.aspx
 
S

Suzanne S. Barnhill

You'll need section breaks between chapters. Then, in addition to "Different
odd and even," also enable "Different first page." Leave the First Page
Header blank. By default, the StyleRef field does pick up the most recent
occurrence of the referenced style and should not be looking ahead to
something 10 pages later. But you could force this by inserting an empty
paragraph in the referenced style at the beginning of the document. Or you
can omit the StyleRef field from the header(s) in the front matter (or use a
StyleRef to pick up the style you've used for the Preface or TOC heading).

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top