#1
|
|||
|
|||
Conditional Style ref
I have a long document with multiple sections. I am using Styleref fields in the header to cross refer to heading styles chaper and subchapter
e.g. Line 1 { styleref "Heading 1" \n} {styleref "Heading 1"} Line 2 {Styleref "Heading 2" \n} {styleref "Heading 2"} I have encountered two problems 1. Sometimes there is no sub chapter In this case I would like the heading 2 styleref to be blank but unfortunately Word seems to search past the next Level 1 heading to return the Level 2 heading of the next chapter. Eg you get 1 A chapter heading 2.1 A chapter heading too far. where there is no sub chapter 1.1 Is there any way I can persuade Word to make the sub charter references blank in the above case. 2. In some cases the Heading 2 style precedes the heading 1 so I have to use the \l switch But this is frustrating as I want the same fields in each section heading, I don't want to have to scan through the document each time we make changes to see if I need to remove the \l switch. So I think this is a feature request for the Styleref field The searching for the styleref reference should respect the outline level of the style if it is not BodyText and only search backwards or forwards within the context of the outline level of the styleref field. In the meantime I can write yet another macro to search headings to detect both of the cases above and make the necessary changes to the document. |
#2
|
||||
|
||||
The simple way would be to insert an empty paragraph formatted in the Heading 2 Style (perhaps formatted as hidden text).
This is not the place to make "a feature request for the Styleref field" - as stated on every page on this site, msofficeforums.com isn't even associated with Microsoft. If you don't like the way something works, you could make a suggestion for a change at http://word.uservoice.com/.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Use multiple style sets in the same Word document (depending on which section the style is in) | Ricyteach | Word VBA | 6 | 03-09-2015 07:11 PM |
How to globally change the formatting of a bullet style to another style? | ravl13 | Word | 5 | 03-10-2013 05:04 PM |
Config style to restart numbering if it it comes after a style of a higher level | ghumdinger | Word | 7 | 08-31-2011 01:10 AM |
Matching text style to drawing object style | notarichman | PowerPoint | 0 | 03-07-2011 11:34 AM |
Character style stripped while applying paragraph style | sams_gates | Word | 0 | 08-29-2009 02:03 AM |