WinWord: STYLEREF Does Not Work Properly with \L Switch

ID: Q90304

The information in this article applies to:

SUMMARY

In Word, if you insert a STYLEREF field with the \L switch in the header or footer, it may not correctly reference the last instance of text on a page formatted with the specified style.

Syntax: {STYLEREF "heading 1" \l}

Word 6.0, 7.0

The "\L" switch in the STYLEREF field causes Word to search from the end of the current page for the text to be referenced in this field. If a manual page break occurs on the page, the text being referenced on the next page will appear in the heading instead of the text at the bottom of the current page, or the first heading of the first page will appear instead of the last heading on the first page.

Word for Windows, Versions 1.1a, 2.0, 2.0a, 2.0a-CD, 2.0b, and 2.0c

If your document contains manual page breaks and the next page begins with the specified style, the \L switch causes the STYLEREF field to reference the first instance of the specified style from the next page rather than the last instance of the style from the current page.

The \L switch works correctly with automatic (soft) page breaks.

Word for Windows, Versions 1.0 and 1.1

The \L switch is ignored when used in the STYLEREF field.

Microsoft has confirmed this to be a problem in Word for Windows versions 1.0 and 1.1. This problem was corrected in version 1.1a.

WORKAROUND

Word Version 6.0

1. From the Format menu, choose Paragraph.

2. Select the Text Flow tab and select the Page Break Before check box.

This will create the correct results for the STYLEREF \L field in the previous page.

Word Versions 2.x

Use manual page breaks. Insert a blank line at the beginning of the next page and format it with a different style than the style referenced by the STYLEREF field in the header or footer. Format the line spacing for this line as Exactly: .01" to compensate for the space the line is taking up in the document.

View the results in Page Layout or Print Preview. Word cannot accurately determine the position of the document insertion point when the header/footer pane is displayed and may, therefore, return an inaccurate result when the STYLEREF field is viewed in Normal view.

KBCategory: kbusage KBSubcategory: kbfield Additional query words: 6.0 6.0a 6.0c 1.0 1.10 1.10a 2.0 2.0a winword 7.0 word95 2.0a-CD 2.0b 2.0c styles headers footers word7 word6 dictionary winword2

Keywords          : kbfield 
Version           : 1.x 2.x 6.0 6.0a 6.0c 7.0
Platform          : WINDOWS

Last Reviewed: February 6, 1998