Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #6  
Old 11-25-2024, 03:22 PM
macropod's Avatar
macropod macropod is offline Delete a Line in a TOC Windows 10 Delete a Line in a TOC Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
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

With multiple TOCs in your document, I'd have expected there to be a \b switch pointing to the bookmarked range used for each. I don't see that in the code you posted. Something like:

{ TOC \O "1-2" \H \Z \W \B BkMk1}

without the need to have a separate FIRSTLIST, SECONDLIST, etc. Styles. For which you could then code along the lines of:

{IF{TOC \o "2" \B BkMk1}= "Error!*" "" {TOC \O "1-2" \Z \W \B BkMk1}}

Just changing the bookmark names. As it is, you should be able to use something like:

{IF{TOC \T "ITEM HEADING - FIRSTLIST,2"}= "Error!*" "" {TOC \O "1-1" \Z \T "ITEM HEADING - FIRSTLIST,2" \W}}
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete a Line in a TOC Horizontal line I can't delete goingvirtual Word 2 09-09-2018 02:58 AM
Delete a Line in a TOC Delete certain characters from a line Helend269 Word VBA 5 01-09-2018 12:08 PM
Delete a Line in a TOC Delete line above sidenote JackDaniels Word 2 10-01-2016 08:04 AM
If Statement in vba to Delete a Line mbesspiata Excel Programming 4 04-08-2014 04:32 AM
Cannot delete line adkr Office 1 04-07-2010 09:26 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:47 AM.


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