Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-06-2021, 03:29 PM
twgonder twgonder is offline Numbered list with cross reference strange results Windows 10 Numbered list with cross reference strange results Office 2016
Novice
Numbered list with cross reference strange results
 
Join Date: Jun 2021
Posts: 4
twgonder is on a distinguished road
Default Numbered list with cross reference strange results

Hello, I remember trying this years ago in word, and never found the solution. I'm working on a large document with a huge numbered list, at the moment 10 legal pages long. I want a numbered list "paragraph" to be able to reference another in the same document, and do it properly after moving paragraphs around (in the final polishing) in the same numbered list. Here's what the version of Word is on Windows 10, Office 2016 Pro.

WordNlCrBug1.PNG

This is a test document that I created. Five numbered list item have a reference to the next list item. 1 cross references to 2, 2 to 3, etc. 6 & 7 are for copy and paste testing. All cross references were created were created using full context, but I tried the other options without success.

WordNlCrBug2.PNG

I created a new cross reference to show the dialog, this one uses only the paragraph option.

WordNlCrBug3.PNG



And the result in the numbered list text fro the cross reference insertion.

WordNlCrBug4.PNG

Now cut and paste list item 6. (This is bullet #6...) in front of list item #2

WordNlCrBug5.PNG

You can see that after update, all the cross reference numbers increased appropriately, with the exception of list item 1. (This is bullet #1...) which should have the cross reference codes updating to 3 and not remaining at 2. Am I correct in thinking that the cross references to bullet #2 should now be on list item 3.?

I've searched for solutions. Some say to use a bookmark and others say it isn't necessary. Thanks for your insights.

Note: I would add the Word docx file and another example but this forum only allows 5 uploads per topic.
Reply With Quote
  #2  
Old 06-06-2021, 04:15 PM
Guessed's Avatar
Guessed Guessed is offline Numbered list with cross reference strange results Windows 10 Numbered list with cross reference strange results Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,977
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

The way that xrefs work is they use a hidden bookmark. If you create a xref to a numbered item, Word puts in this hidden bookmark around the entire contents of the paragraph (but not the paragraph mark itself). If you happen to insert content at the start of a paragraph that has a bookmark start sitting in exactly the same location then you are inserting that content INSIDE the hidden bookmark. The cross ref is therefore now pointing at that inserted content + the original content.

This is important to know because when you moved #6, you effectively did this by positioning your cursor AT THE START of #2 para (inside the bookmark) and pasting in there. Therefore the NEW start of that hidden bookmark is now what was #6 but NOW is the new #2. There is now NO bookmark which starts at the beginning of the old #2.

When a xref to a paragraph number points at a bookmark that includes more than 1 paragraph, the number that shows is the paragraph number of the FIRST paragraph in the bookmark - hence the xref to #2 still points at #2 even though it SHOULD have been smart enough to adjust to point at #3 which is what it now is.

This can be hard to understand without seeing how bookmarks behave. There is an option setting in File>Options>Advanced>Show document content >Show bookmarks. If this is ticked, you can select the first word of a paragraph and add a bookmark. You should see grey brackets appear where the bookmark starts and ends. Now paste content at the location where that bookmark starts and see where the bookmark now starts. Try pasting the same content where the bookmark ends and see what happens there.

The hidden bookmarks Word puts in for xrefs won't show up with the option setting but they behave in exactly the same way.

For more detailed info with visuals, see Cross-referencing in Word – how cross-reference fields work and Word cross-references - troubleshooting
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia

Last edited by Guessed; 06-06-2021 at 04:49 PM. Reason: Added links for additional info
Reply With Quote
  #3  
Old 06-06-2021, 05:00 PM
twgonder twgonder is offline Numbered list with cross reference strange results Windows 10 Numbered list with cross reference strange results Office 2016
Novice
Numbered list with cross reference strange results
 
Join Date: Jun 2021
Posts: 4
twgonder is on a distinguished road
Default

Thanks for the answer, If I understand correctly, you're saying that when 6. was pasted, the hidden bookmark stayed with 2. (and before the text of old 6.) and didn't move down to 3. (with what was 2.)?

The weird thing is that I cut and pasted many times from lines 1. - 5. and it seemed to work without problems. Which makes me think that 6. (which doesn't have a hidden bookmark) when I moved it to position 2. could have messed up Word. But I can't think of a logical reason for it to work like that. (update: I tried more pasting in the manner mentioned and Word did make a complete mess of things with xref or not)

Now the big question, What options should be used (paragraph, no context, full context) and is there a way to cut and paste without Word making a mess of my document? Because many numbered items in my list don't have xrefs (or whatever other problem is hidden) and I can't keep figuring out What word did to my dozens of xrefs. Is there a trick to insert outside the hidden bookmark?

As I said earlier, this was a problem with word 20 years ago. How the F#@$ can it still be a problem?
Reply With Quote
  #4  
Old 06-06-2021, 05:25 PM
Guessed's Avatar
Guessed Guessed is offline Numbered list with cross reference strange results Windows 10 Numbered list with cross reference strange results Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,977
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

There are tricks but they won't make sense to you unless you fully understand the reason that xrefs break/deform in the way that they do.

The tricks could involve a different way of creating the xref or a different way of working if you already have xrefs in your document.

In the case of your example (and in GOOD PRACTICE terms), if you want to insert text IN FRONT of a paragraph which MIGHT have a cross-reference pointing at it - NEVER add your content by putting your cursor at the start of the paragraph and pressing ENTER or Paste.

Instead, put your cursor at the end of the preceding paragraph, press Enter, add your new content and if necessary remove the extra paragraph mark you added at the start.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #5  
Old 06-06-2021, 05:47 PM
twgonder twgonder is offline Numbered list with cross reference strange results Windows 10 Numbered list with cross reference strange results Office 2016
Novice
Numbered list with cross reference strange results
 
Join Date: Jun 2021
Posts: 4
twgonder is on a distinguished road
Default

Ha ha, I was just about to try pasting at the end of the previous line. And I suspected there would be an extra paragraph mark. I'll go play with that.

Update: here's what seems to work (as suggested by that helpful Andrew):
1. Place the cursor just before the paragraph mark of the previous paragraph of where you want insert.
2. Press enter
3. Paste the text
4. Press delete to remove the extra empty paragraph.
5. Say: Good grief Microsoft!

Another update: It seems to work okey, but I haven't been able to find a way to insert new text into line 1., so that line 1. becomes line 2. The xrefs below become corrupted again.

Last edited by twgonder; 06-06-2021 at 06:35 PM. Reason: additional tip
Reply With Quote
  #6  
Old 06-06-2021, 07:56 PM
Guessed's Avatar
Guessed Guessed is offline Numbered list with cross reference strange results Windows 10 Numbered list with cross reference strange results Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,977
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

The same principle applies to adding before paragraph 1.
1. Put your cursor at the end of the preceding paragraph
2. Add the content (it won't be part of the list)
3. Select the complete list (including the new paragraph) and reapply your list formatting/style. You may need to restart the number and get the old #1 to continue the numbering.
4. Update your xRef fields.

An alternative is to add the new line to the end of the list, then select all the previous existing list paragraphs and press Alt+Shift+Down Arrow to move them below the new entry.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #7  
Old 06-07-2021, 09:02 AM
twgonder twgonder is offline Numbered list with cross reference strange results Windows 10 Numbered list with cross reference strange results Office 2016
Novice
Numbered list with cross reference strange results
 
Join Date: Jun 2021
Posts: 4
twgonder is on a distinguished road
Default

The samples above were done for testing on what is a real-world Word task. As I mentioned, there is a large document going through revisions by different people. In addition, the original document is going through an evolution too, from text, to numbered list to Multilevel List.

Since I've had problems with moving paragraphs in the past, it was necessary to do some sample testing before mucking up the principal document. Later I'll delve into the intricacies of document revision by multiple people.

Anyways, when I did client support back in the days of mini-computers, I always appreciated it if the client could provide me with a simplified version of the problem for testing. For those that don't want to create their own sample, I provide two .docx files that you can play with. For my purposes I moved paragraphs around in the first file, and then tried copying from a different document (simulating the work done by another person, version A) into the master.

Have fun and remember to do a ctrl+a, F9 before checking the results.
To my knowledge, there shouldn't be any macros, virus or otherwise, in the files.
Attached Files
File Type: docx TestBulletsEndnotes.docx (18.6 KB, 4 views)
File Type: docx TestBulletsEndnotesA.docx (17.8 KB, 4 views)

Last edited by twgonder; 06-07-2021 at 11:53 AM. Reason: changed "master document" to "prinicpal document"
Reply With Quote
  #8  
Old 06-07-2021, 03:35 PM
Guessed's Avatar
Guessed Guessed is offline Numbered list with cross reference strange results Windows 10 Numbered list with cross reference strange results Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,977
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

Copy/Pasting of hyperlinks and bookmarks raises some other things you should know.

1. Copy a range including a hidden bookmark, paste it somewhere else in the same doc, update a xref to the original range and it still points at the original range (where the bookmark still sits), then delete the original range (thus removing the bookmark), update xref and now it is broken. Paste again, the same content can retain the bookmark this time and thus xref will update again successfully, pointing at this new pasted range.
Lesson: If you copy/paste text containing bookmarks into a document which already contains that bookmark name, the second copy of the bookmark can't exist so it disappears when you paste it. If you cut instead of copy this wouldn't be a problem.

2. You can copy/paste from one document to another and xrefs will continue to work as long as both the xref and the same bookmark name exist in the target document.

3. You can repair a broken xref by recreating a bookmark by copying its name from the field code of the xref and then adding that bookmark at the 'target text' location.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
Reply

Tags
cross reference



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cross-reference with full context a numbered list inside another multilevel list (list style) MatLcq Word 0 02-01-2021 06:00 AM
Numbered list with cross reference strange results Formula for Cross Referencing Numbered List hiwire03 Word 9 08-09-2020 12:01 PM
How to export/import a cross-reference list? Satyavan Word 1 08-30-2018 04:14 AM
Numbered list with cross reference strange results Cross-Reference List - Error when re-arranging List SamMc Word 9 04-09-2018 05:53 PM
Numbered list with cross reference strange results Cross reference content control list with autotext or other text markmichel64 Word VBA 5 01-30-2015 01:41 AM

Other Forums: Access Forums

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