Is it possible to generate footer based on data?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a footer that is populated with the current page's "Heading 2"; and I
use this template often.

However, sometimes the work I do does not include having a "Heading 2", and
so obviously I can just delete that part of the footer.

But, I was wondering if there's any way that I could have the footer
populate the field if there is a Heading 2.

[to have it populate the Heading 2 in the footer, I go to:.... in case that helps]

Any help would be very appreciated.
Thanks, and happy new year!
Matt
 
You could use a conditional field eg

{ IF{ STYLEREF "Heading 2" } <> "Error*" "{ STYLEREF "Heading 2" }" }

This checks for the error message that occurs when there is no named style
and only inserts the Styleref field when the error doesn't occur. This
certainly works in Word 2003 at least.

http://www.gmayor.com/formatting_word_fields.htm#Styleref


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
I have a footer that is populated with the current page's "Heading
2"; and I use this template often.

However, sometimes the work I do does not include having a "Heading
2", and so obviously I can just delete that part of the footer.

But, I was wondering if there's any way that I could have the footer
populate the field if there is a Heading 2.

[to have it populate the Heading 2 in the footer, I go to:... in case that helps]

Any help would be very appreciated.
Thanks, and happy new year!
Matt
 
Graham --

Thanks -- much appreciated.

Matt

Graham Mayor said:
You could use a conditional field eg

{ IF{ STYLEREF "Heading 2" } <> "Error*" "{ STYLEREF "Heading 2" }" }

This checks for the error message that occurs when there is no named style
and only inserts the Styleref field when the error doesn't occur. This
certainly works in Word 2003 at least.

http://www.gmayor.com/formatting_word_fields.htm#Styleref


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
I have a footer that is populated with the current page's "Heading
2"; and I use this template often.

However, sometimes the work I do does not include having a "Heading
2", and so obviously I can just delete that part of the footer.

But, I was wondering if there's any way that I could have the footer
populate the field if there is a Heading 2.

[to have it populate the Heading 2 in the footer, I go to:
Insert
Field
switch the "Categories:" drop down to "Links and References"
in the resulting Field names: list I click on "StyleRef"
And then click on "Heading 2" in the resulting Style name: list.
... in case that helps]

Any help would be very appreciated.
Thanks, and happy new year!
Matt
 
You are welcome :)

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham --

Thanks -- much appreciated.

Matt

Graham Mayor said:
You could use a conditional field eg

{ IF{ STYLEREF "Heading 2" } <> "Error*" "{ STYLEREF "Heading 2"
}" }

This checks for the error message that occurs when there is no named
style and only inserts the Styleref field when the error doesn't
occur. This certainly works in Word 2003 at least.

http://www.gmayor.com/formatting_word_fields.htm#Styleref


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
I have a footer that is populated with the current page's "Heading
2"; and I use this template often.

However, sometimes the work I do does not include having a "Heading
2", and so obviously I can just delete that part of the footer.

But, I was wondering if there's any way that I could have the footer
populate the field if there is a Heading 2.

[to have it populate the Heading 2 in the footer, I go to:
Insert
Field
switch the "Categories:" drop down to "Links and References"
in the resulting Field names: list I click on "StyleRef"
And then click on "Heading 2" in the resulting Style name: list.
... in case that helps]

Any help would be very appreciated.
Thanks, and happy new year!
Matt
 

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

Back
Top