Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Feb 2003
    Thanked 0 Times in 0 Posts

    STYLEREF field (6.0)

    Don't laugh, but I'm still using Word 6 - & it's great! Here's my problem. I have a document with about 150 articles. Each article is preceeded by a Heading 1 paragraph. I want to use the STYLEREF field to show the article name that appears at the top of each page. The problem is when an article starts on page 1 and continues on page 2, and a 2nd article starts in the middle of page 2. I want the title of article 1 on the header of the 2nd page. Using STYLEREF, I get the title of the 2nd article.
    Any workarounds? Please!
    Macros in WordBasic, of course.

  2. #2
    Super Moderator
    Join Date
    Jan 2001
    Melbourne, Victoria, Australia
    Thanked 295 Times in 267 Posts

    Re: STYLEREF field (6.0)

    Well you will pleased to know that you would get exactly the same result in the later versions of Word too.

    What you require is not how Microsoft coded that field switch and the swtiches don't come to the rescue either. It will require some mental gymnastics to work out a way around that.

    I don't suppose a Page Break before the Heading 1 style is acceptable. <img src=/S/doh.gif border=0 alt=doh width=15 height=15>

    The best I can come up with is to define a new style which is hidden. Use it in front of each "Heading 1" and give it the same contents as the PRECEDING Heading 1 (first two should have the same contents). Now build your StyleRef field on this style instead. Naturally this doesn't appear to work if the style is hidden SO what if the style was set to White and made small - now it works. You would need to give it very little paragraph spacing and ensure that it didnt ever appear at the top of a page (perhaps a keep with next on the last real paragraph before a Heading 1).
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  3. #3
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Silicon Valley, USA
    Thanked 94 Times in 90 Posts

    Re: STYLEREF field (6.0)

    I think you will need a macro. It is possible to create a field that will always use the STYLEREF from the previous page. I'm attaching an example. It is very twitchy, and as you page up and down in print preview, you will see it updating itself in steps as, I suppose, the internal STYLEREF fields are updated. Anyway, it doesn't work if you in fact have a new article aligned with the top of a page, rather than a continuation.

    I wonder if MS has documented some other workaround for this, as I imagine it might be a common request. Have you checked the search engine at Even if the code isn't in WordBasic, it would provide some ideas for an approach.
    Attached Images Attached Images

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts