Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-08-2016, 07:31 AM
larrylandis01 larrylandis01 is offline Bookmark error in TOC when headings replaced Windows 7 32bit Bookmark error in TOC when headings replaced Office 2010 32bit
Novice
Bookmark error in TOC when headings replaced
 
Join Date: Apr 2016
Posts: 2
larrylandis01 is on a distinguished road
Default Bookmark error in TOC when headings replaced

From a row in a Word table, I take 3 entries (A,B,C), concatenate them (A & B & C) and format them elsewhere in the document with the appropriate heading style, each concatenation on its own page. This is repeated for the 1300+ rows of the table. (The table is later deleted as it's no longer needed.) I then generate the table of contents, which shows each entry as A & B & C and the correct page number.



Great so far, but I then update the heading on each page with just A & B.

When I print the doc, each TOC entry shows just A & B.

The only way to get around this seems to be locking the TOC, but then if additional pages are added to the doc, the TOC page numbers are incorrect. If the TOC isn't locked, when the doc is printed, each TOC entry goes to just A & B.

Whether Update Fields Before Printing is selected in Options doesn't seem to matter (as I remember...by now, though, I've tried so many things that my brain is mush and I may not have that correct).

What's going on...and any suggestions to correct or a workaround?

THANKS!!!!
Reply With Quote
  #2  
Old 04-08-2016, 07:43 AM
gmaxey gmaxey is offline Bookmark error in TOC when headings replaced Windows 7 32bit Bookmark error in TOC when headings replaced Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,438
gmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the rough
Default

What is it that you want to get around? Are you saying that you want the TOC to reflect A & B & C ..... 1

When the actual heading on page 1 that is used to define the TOC is just A & B?
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
  #3  
Old 04-08-2016, 09:46 AM
larrylandis01 larrylandis01 is offline Bookmark error in TOC when headings replaced Windows 7 32bit Bookmark error in TOC when headings replaced Office 2010 32bit
Novice
Bookmark error in TOC when headings replaced
 
Join Date: Apr 2016
Posts: 2
larrylandis01 is on a distinguished road
Default Bookmark error in TOC when headings replaced

Precisely. Both the page heading and TOC start out as A & B & C, but after generating the TOC and before printing, the page heading gets shortened to just A & B.
Reply With Quote
  #4  
Old 04-08-2016, 10:00 AM
gmaxey gmaxey is offline Bookmark error in TOC when headings replaced Windows 7 32bit Bookmark error in TOC when headings replaced Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,438
gmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the rough
Default

But you say in your original post that "YOU" update the page heading on each page:

"Great so far, but I then update the heading on each page with just A & B."

If you TOC is created based on styles e.g., Heading 1 and you change the Heading 1 text then the TOC will update to reflect the changed text.


You might try:

Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey
ActiveDocument.TablesOfContents(1).UpdatePageNumbe rs
lbl_Exit:
Exit Sub
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
  #5  
Old 04-08-2016, 04:52 PM
macropod's Avatar
macropod macropod is offline Bookmark error in TOC when headings replaced Windows 7 64bit Bookmark error in TOC when headings replaced Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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

Quote:
Originally Posted by larrylandis01 View Post
From a row in a Word table, I take 3 entries (A,B,C), concatenate them (A & B & C) and format them elsewhere in the document with the appropriate heading style, each concatenation on its own page... I then generate the table of contents, which shows each entry as A & B & C and the correct page number.

Great so far, but I then update the heading on each page with just A & B.

When I print the doc, each TOC entry shows just A & B.
That's precisely how a TOC field is supposed to work - it updates to reflect any changes to the referenced headings. While there is an option to update just page #s when you select the TOC and press F9, that's not going to help if you add new Headings or delete some. Furthermore, if Word's 'update fields before printing' option is on you may find you're getting unwanted updates anyway. To prevent such updates, you'd need to lock or unlink the field. You can lock it via Ctrl-F11 (Ctrl-Shift-F11 unlocks) or unlink it (i.e. convert to text) via Ctrl-Shift-F9.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Tags
toc, toc hyperlinks, toc problems



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bookmark error in TOC when headings replaced Bookmark not replaced when inserting but to lower right corner of image newbieX Word VBA 6 11-20-2015 02:03 PM
Bookmark error in TOC when headings replaced Bookmark Not Showing Bookmark RegAudit Word 6 03-16-2015 11:08 PM
Bookmark error in TOC when headings replaced Style Replaced When Deleting a Line WordHostage Word 2 11-26-2011 11:24 AM
Cannot remove replaced personal folder rumin Outlook 2 01-31-2011 08:28 AM
TOC printing Error Bookmark not Defined techexpressinc Word 0 12-14-2008 05:24 PM

Other Forums: Access Forums

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