Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Numbering / June 2004

Tip: Looking for answers? Try searching our database.

STYLEREF picks up only the first style

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MJK - 23 Jun 2004 20:55 GMT
I have a document that has headings in it, each marked with the appropriate style. I'm looking for a way to have the page headers reflect the text of the previous "Heading 1" paragraph, or, if there's a "Heading 1" paragraph on the page, the text of the first such paragraph. In other words, I'm looking for something that behaves the way that STYLEREF is documented as behaving.

I've tried using {STYLEREF "Heading 1" \* CHARFORMAT} in the page header for odd-numbered pages.

On page 1, this works perfectly and shows the correct text.
On page 2, there is a Heading 1 paragraph.
On page 3, the page header shows the original text (as in page 1) and ignores the text of the Heading 1 paragraph on page 2.

In fact the odd-numbered page headers show identical text throughout the document and ignore all "Heading 1" paragraphs except the first one.

As an experiment I tried inserting a (continuous) section break in the middle of the document: the odd-numbered page headers after that point reflected the last "Heading 1" paragraph *before* the section break.

Is it really necessary to insert a section break after every occurrence of one's chosen style, if one wants STYLEREF to work properly?

I'm using Word 2000.
Charles Kenyon - 23 Jun 2004 22:29 GMT
StyleRef works the way it is documented (for me in Word 97-2003). I use it
extensively. I don't use different odd and even that often. I just tried (in
Word 2003):

3-page document set for different odd and even, 3 heading 1 paragraphs, the
first two are on page 1 and the third is on page 2 (preceded by a manual
page break). The odd-page header has a styleref field for heading 1. The
header on page 1 shows the first heading 1 pagagraph. The header on page 2
is blank. The header on page 3 shows the last heading 1 paragraph (from page
2).
Signature


Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

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

See also the MVP FAQ: 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.

--

Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

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

See also the MVP FAQ: 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.

> I have a document that has headings in it, each marked with the appropriate style. I'm looking for a way to have the page headers reflect
the text of the previous "Heading 1" paragraph, or, if there's a "Heading 1"
paragraph on the page, the text of the first such paragraph. In other words,
I'm looking for something that behaves the way that STYLEREF is documented
as behaving.

> I've tried using {STYLEREF "Heading 1" \* CHARFORMAT} in the page header for odd-numbered pages.
>
[quoted text clipped - 5 lines]
>
> As an experiment I tried inserting a (continuous) section break in the middle of the document: the odd-numbered page headers after that point
reflected the last "Heading 1" paragraph *before* the section break.

> Is it really necessary to insert a section break after every occurrence of one's chosen style, if one wants STYLEREF to work properly?
>
> I'm using Word 2000.
MJK - 23 Jun 2004 23:33 GMT
I tried again. The problem occurs when the STYLEREF field is inside a text box. Sorry not to have mentioned it before: I didn't realise (until your reply) that it might be relevant.
Suzanne S. Barnhill - 24 Jun 2004 01:46 GMT
Yep, Word (especially older versions) has a hard time "seeing" anything in a
text box, since the text box is in the drawing layer.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Signature

Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.


> I tried again. The problem occurs when the STYLEREF field is inside a text box. Sorry not to have mentioned it before: I didn't realise (until your
reply) that it might be relevant.
MJK - 24 Jun 2004 09:12 GMT
I suppose I should have guessed: I've already had to write a macro to update page references in text boxes explicitly because Word won't do it.

My own suspicion is that someone has written a clone of Microsoft Word that is used *only* for text boxes, and that, like all clones, has only a passing resemblance to the original!

Anyway, I've removed the text box and laboriously recreated its formatting using paragraph styles, borders, tab stops, etc, and now STYLEREF works. Thank you for your help!

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.