Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-01-2024, 11:30 PM
RRB's Avatar
RRB RRB is offline StyleRef in page header Windows 11 StyleRef in page header Office 2021
Susan Flamingo
StyleRef in page header
 
Join Date: May 2014
Location: The Holy City of Jerusalem
Posts: 264
RRB is on a distinguished road
Default StyleRef in page header

Hi dear friends!



My page is formatted that certain paragraphs (but not all) are numbered. So on a certain page we could have numbers 21, 22, 23. The numbers are formatted with a char style named paranum.

I want to put that range in the header. So I insert a styleref field (to the text formatted with style ParaNum) which will scan from top to bottom and then another styleref field which will scan from bottom to top. which will render: 21 23 (and I put a hyphen between the fields so it displayed as 21-23). Cool.

But if there is only one paranum style on a certain page it will show 24-24. How can I tell styleref field in the header that if there is only one text formatted with style paranum it should display only that?

Thank you and have a good day!

Susan Flamingo
Reply With Quote
  #2  
Old 04-02-2024, 01:57 AM
Guessed's Avatar
Guessed Guessed is offline StyleRef in page header Windows 10 StyleRef in page header Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,993
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

This is done with a nested field constructed like this (assuming the style is called XX)

{If {StyleRef XX \n} = {StyleRef XX \n \l} {StyleRef XX \n} "{StyleRef XX \n} - {StyleRef XX \n \l}"}
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #3  
Old 04-02-2024, 12:19 PM
Charles Kenyon Charles Kenyon is offline StyleRef in page header Windows 11 StyleRef in page header Office 2021
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,165
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

See also Useful StyleRef tricks by Suzanne Barnhill, MVP
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
StyleRef in page header StyleRef field in header does not repeat in subsequent pages Constantine Word 5 01-19-2024 02:07 PM
StyleRef in page header Prevent header from using StyleRef x when x is not present in current section Firebody Word 8 11-12-2021 10:53 AM
StyleRef in page header Randomly, Styleref H1 Heading Isn't Applying in Header icor1031 Word 2 01-06-2017 01:28 AM
Controlling StyleRef display in header Cheryl K Word 0 02-07-2013 10:59 AM
Change font of STYLEREF in Header/Footer SQLUSA Word 4 08-13-2012 01:54 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:17 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