Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-16-2019, 02:14 PM
RobEd RobEd is offline Numbered List - Auto Update para numbers that are referred to in later paragraphs. Windows 10 Numbered List - Auto Update para numbers that are referred to in later paragraphs. Office 2019
Novice
Numbered List - Auto Update para numbers that are referred to in later paragraphs.
 
Join Date: Oct 2019
Posts: 5
RobEd is on a distinguished road
Default Numbered List - Auto Update para numbers that are referred to in later paragraphs.

I have a list that as shown in the attached document.



If there is an addition to or subtraction from the list, one must always remember to change the references in the paragraphs below. Is it possible to make that an automatic process? I’ve played around with inserting a Reference but that does not capture the period after the number nor does it capture if there is a new number 1. Also, it would be wonderful if the number would update automatically – not just on open, close or print.

I don’t even know how to search for this. Any help would be much appreciated.
Attached Files
File Type: docx Para Numbering Question.docx (16.0 KB, 6 views)
Reply With Quote
  #2  
Old 10-16-2019, 03:21 PM
Guessed's Avatar
Guessed Guessed is offline Numbered List - Auto Update para numbers that are referred to in later paragraphs. Windows 10 Numbered List - Auto Update para numbers that are referred to in later paragraphs. Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,919
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

Using Cross References to do this will give you a field. All fields can be updated any time by selecting them and pressing F9. To update all the fields in the entire document you just press Ctrl-A then F9.

It is an odd requirement to expect the period to be included in the cross-reference field instead of just adding it after the field. It can be done if you modify the cross-ref field code to add a specific number formatting. For example you could change
{REF _Ref22119258 \r \h}
to
{REF _Ref22119258 \r \h \# "#0."}

I have no idea on what you expect to happen if a new number 1 clause is added. Are you saying clauses B and C should be smart enough to automatically include a cross-ref to the new 1 as an exclusion but not if I add a new clause 6?
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #3  
Old 10-17-2019, 06:38 AM
RobEd RobEd is offline Numbered List - Auto Update para numbers that are referred to in later paragraphs. Windows 10 Numbered List - Auto Update para numbers that are referred to in later paragraphs. Office 2019
Novice
Numbered List - Auto Update para numbers that are referred to in later paragraphs.
 
Join Date: Oct 2019
Posts: 5
RobEd is on a distinguished road
Default

Hi Andrew,

Thank you for replying. I'll try changing the field code. I've never done that before!

If a new number 1 clause is added, the current number 1 is now number 2. The reference in the following paragraph needs to change to 2 so it is referencing the correct paragraph. Does that help?
Reply With Quote
  #4  
Old 10-17-2019, 11:28 AM
RobEd RobEd is offline Numbered List - Auto Update para numbers that are referred to in later paragraphs. Windows 10 Numbered List - Auto Update para numbers that are referred to in later paragraphs. Office 2019
Novice
Numbered List - Auto Update para numbers that are referred to in later paragraphs.
 
Join Date: Oct 2019
Posts: 5
RobEd is on a distinguished road
Default

Hi again, Andrew.

I finally got the field codes to do what I want them to do. I still can't figure out how to make the number 1 change to 2 if something is added before it. Any thoughts?
Reply With Quote
  #5  
Old 10-17-2019, 02:21 PM
Charles Kenyon Charles Kenyon is offline Numbered List - Auto Update para numbers that are referred to in later paragraphs. Windows 10 Numbered List - Auto Update para numbers that are referred to in later paragraphs. Office 2016
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,070
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

For the original number to change you need to be using some sort of Automatic numbering.

The simplest is numbering tied to styles.
How to create numbered headings or outline numbering in Ribbon Versions of Word by Shauna Kelly

You could also use SEQuence Fields.

The first method can make cross-referencing even easier if the styles used are built-in heading styles.
Why use Microsoft Word’s built-in heading styles? by Shauna Kelly
Reply With Quote
  #6  
Old 10-17-2019, 02:24 PM
RobEd RobEd is offline Numbered List - Auto Update para numbers that are referred to in later paragraphs. Windows 10 Numbered List - Auto Update para numbers that are referred to in later paragraphs. Office 2019
Novice
Numbered List - Auto Update para numbers that are referred to in later paragraphs.
 
Join Date: Oct 2019
Posts: 5
RobEd is on a distinguished road
Default

I do use automatic numbering from styles. So that's not the problem.
Reply With Quote
  #7  
Old 10-17-2019, 03:07 PM
Charles Kenyon Charles Kenyon is offline Numbered List - Auto Update para numbers that are referred to in later paragraphs. Windows 10 Numbered List - Auto Update para numbers that are referred to in later paragraphs. Office 2016
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,070
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

Quote:
Originally Posted by RobEd View Post
I do use automatic numbering from styles. So that's not the problem.
I (somewhat arrogantly) contend that if you did Automatic numbering using styles following all of the steps in Shauna's article, you would not have a problem with one updating when you add or delete another. When you do this, you never touch those numbering buttons at the top once you have your numbering set. You use the styles.

You are welcome to post a sample document with the problem. I would suggest making a copy of your problem document and editing it to remove confidential or proprietary information.
How to attach a screenshot or file in this forum.


[Edit after reading Andrew's post.]
Yup, I was being undeservedly arrogant.

I didn't think of someone doing it that way.

If you use the built-in heading styles, you can cross reference to the heading and have it display the number. It would not help though, if you did as Andrew notes and try to insert a new heading at the beginning of an old one. That puts them both inside the bookmark.
Also, if you use the option to display bookmarks, it does not display these bookmarks, because they are hidden.
The bookmark is not generated until a Cross-Reference is created.

Last edited by Charles Kenyon; 10-18-2019 at 06:15 AM.
Reply With Quote
  #8  
Old 10-17-2019, 04:47 PM
Guessed's Avatar
Guessed Guessed is offline Numbered List - Auto Update para numbers that are referred to in later paragraphs. Windows 10 Numbered List - Auto Update para numbers that are referred to in later paragraphs. Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,919
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

Rob

The problem is how you are inserting the new 1. paragraph and how cross-references work. This post should explain where you are going wrong.

When you insert a cross-ref to a paragraph number, Word sneakily bookmarks the source paragraph with a randomised name that starts with _Ref and finishes with a bunch of random numbers. This works fine if the bookmark remains wholly contained in that paragraph. BUT...

When you then put your cursor at the start of that paragraph and press Enter to insert a paragraph ABOVE that paragraph, AND the bookmark also starts at this location, the hidden bookmark now includes that new paragraph (and finishes where it used to). This means the cross-ref now points at the new para 1 numbering instead of the (now) para 2 that you expected.

To avoid this issue, get into the habit of NEVER inserting new paragraphs by putting your cursor at the start of paragraphs which may have a cross-reference pointing at it. Instead, put your cursor at the end of the paragraph above and press Enter there. That way the new paragraph is not included in the bookmark that the cross-ref is pointing at.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #9  
Old 10-18-2019, 01:21 AM
eNGiNe eNGiNe is offline Numbered List - Auto Update para numbers that are referred to in later paragraphs. Windows 7 32bit Numbered List - Auto Update para numbers that are referred to in later paragraphs. Office 2010 64bit
Expert
 
Join Date: Jan 2012
Location: Brussels [BE]
Posts: 746
eNGiNe is on a distinguished road
Default

This is exactly the sort of fascinating information I visit this forum for :-} if ever one of my less fortunate, Word-using colleagues asks me this question I shall be sure to give credit where it's due.
Reply With Quote
  #10  
Old 10-20-2019, 04:50 PM
Guessed's Avatar
Guessed Guessed is offline Numbered List - Auto Update para numbers that are referred to in later paragraphs. Windows 10 Numbered List - Auto Update para numbers that are referred to in later paragraphs. Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,919
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

FWIW, I use a macro to create cross-references to help reduce the inadvertent breaking caused by the mechanics of how cross-refs work. I find this is faster and works IMHO better in a number of ways.
1. I can see the bookmarks inserted via the macro (if I set my options to see bookmarks) so that I am less likely to make the mistake of inserting a new paragraph from the start of a bookmarked para.
2. I don't need to use the Insert Cross References dialog, change type and scroll to find an entry that is most likely already visible on my screen.
3. I can reinstate bookmarks in the GUI if they have been removed inadvertently. (The GUI on current versions of Word won't let you (re)create a bookmark name that starts with "_" although you could do this in older versions of Word or via VBA)
4. When adding a cross-ref to a paragraph number, I can strategically place these bookmarks NOT at the start of a paragraph to allow me to actually add paragraphs in the way I have been advising you not to. The cross-ref to a para number doesn't care if the bookmark isn't the first thing in a paragraph so I can position the bookmark somewhere after the first character for safety.

The following macro works differently depending on whether you select text or just position your cursor in a paragraph. Either way, it creates a cross-ref and stores it in the clipboard so you can then paste the cross-ref in one (or more) locations.
Code:
Sub MakeXRef()
  'Creates two different types of cross references depending on selection  
  Dim sRef As String, aXRef As Field, aRng As Range, sFieldCode As String
  Dim aRng2 As Range, aBkmk As Bookmark, sPrefix As String
  
  Set aRng = Selection.Range
  'Check to see if we can reuse an existing bookmark or need to create a new one
  For Each aBkmk In aRng.Bookmarks
    If aBkmk.Range = aRng Then
      sRef = aBkmk.Name
      Exit For
    End If
  Next aBkmk
  If sRef = "" Then sRef = "xRef" & Format(Now(), "yyyymmddhhMMss")
  ActiveDocument.Bookmarks.Add sRef, aRng
  
  'Create the XRef and add it immediately after the selection
  If Len(aRng.Text) > 0 Then
    sFieldCode = "Ref " & sRef & " \h"
    sPrefix = ""
  Else
    sFieldCode = "Ref " & sRef & " \h \n"
    sPrefix = "Section "
  End If
  Set aRng2 = aRng
  aRng2.Collapse Direction:=wdCollapseEnd
  Set aXRef = ActiveDocument.Fields.Add(aRng2, Text:=sFieldCode, PreserveFormatting:=False)
  aXRef.Select
  Set aRng = Selection.Range
  aRng.InsertBefore sPrefix
  aRng.Cut
  
  StatusBar = "Cross-reference copied to the clipboard. Paste away..."
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #11  
Old 10-24-2019, 12:59 PM
RobEd RobEd is offline Numbered List - Auto Update para numbers that are referred to in later paragraphs. Windows 10 Numbered List - Auto Update para numbers that are referred to in later paragraphs. Office 2019
Novice
Numbered List - Auto Update para numbers that are referred to in later paragraphs.
 
Join Date: Oct 2019
Posts: 5
RobEd is on a distinguished road
Default

Andrew - THANK YOU - THANK YOU! I didn't understand about the hidden bookmarks. It all makes sense now and everything works wonderfully. Unfortunately, I'm not able to create macros because our system is locked down pretty tight. Very unfortunate!!!! I'll talk to our System Admin to see if he will do it for me as it would be very helpful to see the bookmarks.

Again, thank you so much for taking the time to answer!
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Numbered List - Auto Update para numbers that are referred to in later paragraphs. Highlight numbers after a specific word in numbered list liblikas90 Word VBA 3 02-27-2019 03:52 AM
Numbered List - Auto Update para numbers that are referred to in later paragraphs. Problem with bold numbers in multi-level list styles when having numbered headings AND paragraphs bwofficer Word 2 12-12-2014 12:21 AM
Numbers in Numbered List Insist on Being Bold peytontodd Word 2 09-19-2014 11:01 AM
Word Mixing Numbered Headings with Numbered List Tess0 Word 11 07-15-2014 05:25 AM
Auto-Update Amended Page Numbers? herbertp Word 5 02-01-2013 02:20 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:17 PM.


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