Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-12-2017, 08:56 AM
slaycock slaycock is offline Conditional Style ref Windows 7 64bit Conditional Style ref Office 2013
Expert
Conditional Style ref
 
Join Date: Sep 2013
Posts: 256
slaycock is on a distinguished road
Default 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.
Reply With Quote
  #2  
Old 02-12-2017, 08:37 PM
macropod's Avatar
macropod macropod is offline Conditional Style ref Windows 7 64bit Conditional Style ref Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional Style ref 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
Conditional Style ref 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

Other Forums: Access Forums

All times are GMT -7. The time now is 07:37 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft