Thread: [Solved] Delete a table of contents
View Single Post
 
Old Today, 03:05 PM
Charles Kenyon Charles Kenyon is offline Windows 11 Office 2021
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,602
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 gmaxey View Post
Charles,

As best I can tell .ExecuteMso(TableOfContentsRemove) does mimic the Alt S T R keyboard accelerators.
Thank you for the lead on this. The full command line is Application.CommandBars.ExecuteMso("TableOfContent sRemove") and it does act the same as using the menu command.

I've added your second macro to my web page on Complex Documents under Removing a Table of Contents. I linked back here.
Reply With Quote