![]() |
|
![]() |
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
![]()
I can enter the first (or last) Heading 1, or the Heading 2, or the Heading 3. But I don't care what level the first heading is. Can I get a styleref to ANY heading?
Some pages have the first heading as a Heading 1 1. Introduction 6. Travel Some pages have a lower level heading 2.2 Budget template 7.5 xjhrek I want the first heading on the page to show in the footer, regardless of the level of the header. Ok - now I've said the same thing 3 times. Any tips?? Thanks. |
#2
|
||||
|
||||
![]()
A StyleRef field can reference any Style, regardless of whether Style that is a Paragraph Style or Character Style or, if Heading (which is a Paragraph Style), what level that Heading is. However, a StyleRef field cannot choose between Styles as to which it might show. If you reference Heading 1 via a StyleRef field, then the Heading 1 content is what will be replicated, regardless of whether any other Heading Styles occur on the same page. So, if you reference Heading 1 via a StyleRef field and if you also reference Heading 2 via a StyleRef field, both will show. There is also no other field code that will allow you conditionally to determine which StyleRef field to show.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
||||
|
||||
![]()
Assuming that I have correctly understood what you are trying to accomplish, try the following...
You can create a character style with no formatting added by setting its "Style based on" option to "(underlying properties)." Then apply your character style to all of your heading paragraphs and add { STYLEREF "mycharacterstyle" \L } to the header. For this to work, there must be at least one heading style on each page (otherwise Word starts searching on the other pages).
__________________
Stefan Blom Microsoft Word MVP Microsoft 365 apps for business Windows 11 Professional |
![]() |
Tags |
footer, headings, styleref |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Navigation pane Show.Heading level x only | NobodysPerfect | Word VBA | 11 | 05-09-2014 05:26 AM |
![]() |
kam | Word | 7 | 03-24-2014 02:58 PM |
![]() |
taran | Word | 3 | 07-08-2013 01:12 PM |
One level 3 heading number is wrong - but all others are fine | Dr Wu | Word | 4 | 05-09-2013 10:07 AM |
![]() |
hockeytown | Word | 2 | 10-04-2012 07:58 AM |