How Do I Carry The Same Header But Changing Footer

D

DevalilaJohn

I'm working in Office 2007, but need to support 2003 as well.

I have a document template that will require the user to enter some header
text. From there I want the header text on all pages to reflect those
changes. The catch is that I have different header and footer checked as I
need page numbering in the footer starting on page 2.

I've tried using a styleref to a style that will be unique to the header,
but the field comes back with an error that there is no text with that style.
So I'm assuming that the styleref isn't looking at headers.

Any suggestions would be appreciated.

TIA,

John
 
G

Graham Mayor

You use a styleref field in the header(s) to reference a named style in the
*document* not in the header.
That style must be applied to some text in the document for it to be
repeated in the header(s).
If you have a different first page header set , you will need to insert the
field in both first page and main headers.
See http://gregmaxey.mvps.org/Repeating_Data.htm
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
J

Jay Freedman

First off, you should be using the setting "Different first page" on the
Header & Footer Tools ribbon. That will unavoidably give you both a
first-page header and a first-page footer that are not connected to the
header and footer for the rest of the document.

Now you need some way to enter the user's information so it will appear in
both the first-page header and the "main" header (the one for the rest of
the document). Your experiment was correct: StyleRef fields draw information
only from the document body, not from headers or footers.

There are two basic schemes that you can use:

- Leave the first-page header empty and put the data entry area in the body
text on the first page, positioned at the top. Format it with unique styles
that can be picked up by StyleRef fields in the main header. This article
will be useful: http://sbarnhill.mvps.org/WordFAQs/StyleRef.htm

- Program an AutoNew macro to display a userform
(http://www.word.mvps.org/FAQs/Userforms/CreateAUserForm.htm) that saves the
user's data in document variables. Create the first-page header with
DocVariable fields that display the data (instead of StyleRef fields), and
copy/paste the same stuff into the main header. When the user enters data,
the same text will appear in both first-page and main headers.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
D

DevalilaJohn

Jay Freedman said:
First off, you should be using the setting "Different first page" on the
Header & Footer Tools ribbon. That will unavoidably give you both a
first-page header and a first-page footer that are not connected to the
header and footer for the rest of the document.

Now you need some way to enter the user's information so it will appear in
both the first-page header and the "main" header (the one for the rest of
the document). Your experiment was correct: StyleRef fields draw information
only from the document body, not from headers or footers.

There are two basic schemes that you can use:

- Leave the first-page header empty and put the data entry area in the body
text on the first page, positioned at the top. Format it with unique styles
that can be picked up by StyleRef fields in the main header. This article
will be useful: http://sbarnhill.mvps.org/WordFAQs/StyleRef.htm

- Program an AutoNew macro to display a userform
(http://www.word.mvps.org/FAQs/Userforms/CreateAUserForm.htm) that saves the
user's data in document variables. Create the first-page header with
DocVariable fields that display the data (instead of StyleRef fields), and
copy/paste the same stuff into the main header. When the user enters data,
the same text will appear in both first-page and main headers.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.



Thank you Jay. Those are the options I was considering, so I guess there's no simpler mechanism.
 

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