User of Styleref in Footer

B

Bon

I have always successfully used the Styleref code in my
headers. Now I am trying to use it in my footer to
reference a style on the cover sheet whose content changes
periodically (it is the only place in the document where
this style is used). Using {styleref "style name"} is
showing up blank - not picking up the text in the style.
The Word Online Help does not indicate Styleref cannot be
used in the footer. Any thoughts?

TIA, Bonnie
 
B

Bon

Never Mind -- Figured out the problem :)

Murphy's Law "Send plea for help, THEN figure out the
problem"

Bon
 
A

Anik

What was the problem ??? I seem to have encountered the same problem :
The problem I found about STYLEREF is that it will return the Style Text only if it was found on the same page. If not found in current page, shows up blank.
 
C

Charles Kenyon

Which version of Word?

You do have some text with the style?

The paragraph with the style does not contain a manual page break? I suspect
this would cause a problem.
--

Charles Kenyon

Word New User FAQ & Web Directory:
<URL: http://addbalance.com/word/index.htm>

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide)
<URL: http://addbalance.com/usersguide/index.htm>

See also the MVP FAQ: <URL: http://www.mvps.org/word/> which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.


Anik said:
What was the problem ??? I seem to have encountered the same problem :(
The problem I found about STYLEREF is that it will return the Style Text
only if it was found on the same page. If not found in current page, shows
up blank.
 
G

Graham Mayor

No they are not! Headers and Footers have the potential to change at a
section break. But you can continue the header/footer or you can include the
styleref field in a changed header footer - unless of course it was the
break you were trying to insert into the header/footer. Styleref fields
merely display the contents of a style.

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

Web site www.gmayor.com
Word MVP web site www.mvps.org/word
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
 
C

Charles Kenyon

I don't know how you could have read that entire site in a night! I don't
think I've read the entire site in five years.

Page and section breaks are not incompatible with style ref fields. However,
in Word's structure a manual page break will always be inside a paragraph
even if the first part of the paragraph (before the page break) contains no
text. I suspect that if you place a manual page break on your document in a
paragraph with the style "MyStyle" and have a StyleRef field to that style,
and that is the only instance of the style, it might cause problems. I know
it causes problems with a table of contents if the style is a heading style
appearing in the TOC.

I haven't been able to replicate your problem in Word 2003.
--

Charles Kenyon

Word New User FAQ & Web Directory:
<URL: http://addbalance.com/word/index.htm>

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide)
<URL: http://addbalance.com/usersguide/index.htm>

See also the MVP FAQ: <URL: http://www.mvps.org/word/> which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.

Anik said:
Working with Word 2k
Read all http://www.word.mvps.org pages (got it from Suzanne)
I finally understand the problem: page or section breaks are incompatible
with STYLEREF when place in a footer !
 
C

Charles Kenyon

I don't say that removing manual page breaks is supposed to work. I am
telling you that I suspect it could be causing your problems.

Send me the document and I'll look at it.

Send to wordfaq at NO SPAM addbalance dot REMOVE com

That is the email address after you remove NO SPAM REMOVE and use symbols
instead of words.
--

Charles Kenyon

Word New User FAQ & Web Directory:
<URL: http://addbalance.com/word/index.htm>

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide)
<URL: http://addbalance.com/usersguide/index.htm>

See also the MVP FAQ: <URL: http://www.mvps.org/word/> which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.

Anik said:
After removing manual page breaks, I still have problems. If you say it's
supposed to work, please tell me your magic trick !
This is my document structure :

Table Of Contents
blablabla...
---SECTION BREAK---
Introduction
blablabal...
Description A
Blablabla...
Part 1
Blablabla...
Part 2
blablabla...
Part 3
blablabla...
Part 4
blablabla...
Description B
Blablabla...
Description C
Blablabla...
Part 1
Blablabla...
Part 2
blablabla...
Conclusion
blablabla...
---SECTION BREAK---
References
blablabla...

Intro, Descriptions, Conclusion and References are type "Heading 1"
Parts are type "Heading 2"

The 3 sections breaks (NEXT PAGE) are important to have no header and
footer in sections containing "references" and also "table of contents".
This is my code in the footer:
{ STYLEREF "Heading 1" } - { STYLEREF "Heading 2" }

The result displayed for Heading 1 seems OK., but the "Heading 2" results
displays false information. For example, I get "Description B - Part 4" in
the page beginning by Description B. But this Description B paragraph does
not have a Part 4 !!. How can I maybe place an "if not Heading 2 not found
in Heading 1, put nothing" ?
 
C

Charles Kenyon

Hi,

I looked at your document and the StyleRef field is working the way it is
supposed to work. What you want (what many of us want) is some way to not
have it display irrelevant information. Sorry that I was so dense.
The result displayed for Heading 1 seems OK., but the "Heading 2" results
displays false information. For example, I get "Description B - Part 4" in
the page beginning by Description B. But this Description B paragraph does
not have a Part 4 !!. How can I maybe place an "if not Heading 2 not found
in Heading 1, put nothing" ?
This isn't "false" information, in that the StyleRef field is referring to a
real heading in your document. It is irrelevant because it is referring to a
subheading of a previous heading, not a subheading of the current heading.

If you know which pages this is going to be a problem on, you can use
conditional text -- that is -- IF fields to not display on pages where the
StyleRef is displaying information from a previous setting. Take a look at
http://www.mvps.org/word/FAQs/Numbering/PageNumbering.htm.

This will be a pain to maintain but probably beats inserting extra section
breaks and modifying each section's headers and footers.


Anik said:
After removing manual page breaks, I still have problems. If you say it's
supposed to work, please tell me your magic trick !
This is my document structure :

Table Of Contents
blablabla...
---SECTION BREAK---
Introduction
blablabal...
Description A
Blablabla...
Part 1
Blablabla...
Part 2
blablabla...
Part 3
blablabla...
Part 4
blablabla...
Description B
Blablabla...
Description C
Blablabla...
Part 1
Blablabla...
Part 2
blablabla...
Conclusion
blablabla...
---SECTION BREAK---
References
blablabla...

Intro, Descriptions, Conclusion and References are type "Heading 1"
Parts are type "Heading 2"

The 3 sections breaks (NEXT PAGE) are important to have no header and
footer in sections containing "references" and also "table of contents".
This is my code in the footer:
{ STYLEREF "Heading 1" } - { STYLEREF "Heading 2" }

The result displayed for Heading 1 seems OK., but the "Heading 2" results
displays false information. For example, I get "Description B - Part 4" in
the page beginning by Description B. But this Description B paragraph does
not have a Part 4 !!. How can I maybe place an "if not Heading 2 not found
in Heading 1, put nothing" ?
 

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