logo
search
list

Table of Content

Problem Description: There Way Access Remove
Quick Answer for Resolving Login
Likely Causes Behind Login & Account Issues
Recommended Solution: Installing Office on a New PC
Alternative Solutions for When Office Still Fails
Working with WPS Office: WPS Office for Local Document Work
Prevention Tips for Safer Login Habits
FAQs About Common Login Answers

Fix There Way Access Remove in Word on Windows

Posted by Algirdas Jasaitis

calendar

2026-09-17

views

868

likes

59

When Office stops working as expected, start with the shortest official checks before you reinstall anything.

Problem Description: There Way Access Remove

Other than SendKeys, is there a way, in vba, to access the Remove Table of Contents command found at the bottom of the TOC menus? *Desktop Applications.* ![User's image](/api/attachments/13b6317b-28f3-4f93-8d0a-59b7520a277c?platform=QnA) The [TableOfContents.Delete](https://learn.microsoft.com/en-us/office/vba/api/word.tableofcontents.delete) method does not do the same thing. That method removes the TOC field but does not remove the container for the field if the TOC was inserted using one of the two standard choices. This was discussed in the [Word VBA forum](https://www.msofficeforums.com/word-vba/53950-delete-table-contents.html) recently with the following code. ```vba Sub DeleteAllTOCs() Dim toc As TableOfContents, para As Paragraph, _ i As Long, f As Field, parasToDelete As New Collection Application.ScreenUpdating = False Application.StatusBar = "We are deleting tables of content... Be patient..." For Each f In ActiveDocument.Fields If f.Type = wdFieldTOC Then f.Locked = False parasToDelete.Add f.Code.Paragraphs(1) End If Next f For Each f In ActiveDocument.Fields If f.Type = wdFieldTOC Then f.Delete End If Next f For i = parasToDelete.count To 1 Step -1 parasToDelete(i).Range.Delete Next i Application.ScreenUpdating = True Application.StatusBar = "" Application.ScreenRefresh MsgBox "Done." Set toc = Nothing End Sub ``` That code removes the fields but not the Containers. What I am wondering is whether there is a direct command in vba that corresponds to the menu command. Such a command would remove the selected TOC and container. SendKeys is flaky. It would need to send Alt,S,T,R. I have not tried that.

Screenshot of the reported issue
Screenshot of the reported issue

Quick Answer for Resolving Login

Would this work for you? ```vba Sub DeleteAllTOCs() Dim f As Field, TOCRange As Range Application.ScreenUpdating = False Application.StatusBar = "We are deleting tables of content...

Likely Causes Behind Login & Account Issues

  • The Microsoft account or license context may not match the purchase or device.

  • Cached credentials, outdated builds, or damaged local components can trigger login & account issues.

  • A file-specific corruption or add-in conflict can mimic a broader application failure.

Recommended Solution: Installing Office on a New PC

When to use this: Apply these steps when the symptoms match and you can access the relevant Microsoft account or administrator.

  1. Be patient..." For Each f In ActiveDocument.Fields If f.Type = wdFieldTOC Then f.Locked = False f.Select Set TOCRange = Selection.Range With TOCRange .MoveStart Unit:=wdParagraph, Count:=-1 .MoveEnd Unit:=wdParagraph, Count:=1 .Delete End With Set TOCRange = Nothing End If Next f Application.ScreenUpdating = True Application.StatusBar = "" Application.ScreenRefresh MsgBox "Done." End Sub ``` --- Greg Maxey gave the following suggestion: > As best I can tell .ExecuteMso(TableOfContentsRemove) does mimic the Alt S T R keyboard accelerators. > __________________ Greg Maxey Please visit my web site at[ http://www.gregmaxey.com/]The full command is application.commandbars.ExecuteMso("TableOfContentsRemove") This does completely mimic the command.

Alternative Solutions for When Office Still Fails

  1. Test the same action in a private browser session or a new blank file to isolate account vs file issues.

  2. Capture exact error text and screenshots before contacting Microsoft Support or your administrator.

Working with WPS Office: WPS Office for Local Document Work

WPS Office all-in-one workspace for documents spreadsheets presentations and PDFs
WPS Office — free all-in-one office suite for everyday document work.

WPS Office cannot replace Microsoft account, activation, or cloud fixes for this scenario. It remains one of the best free Microsoft Office-compatible alternatives for opening and editing local files.

  1. Download and install WPS Office from the official website.

  2. Open local Word, Excel, PowerPoint, or PDF files in the matching WPS app.

  3. Save a working copy locally while Microsoft-side issues are resolved.

  4. Return to Microsoft Office after the primary fix succeeds.

If you need a practical local workspace in the meantime, try WPS Office.

Use Word, Excel, and PPT for FREE

Prevention Tips for Safer Login Habits

  • Keep one primary Microsoft account for subscriptions and Office sign-in.

  • Install updates for Office and Windows before retrying failed workflows.

  • Back up important files before repair, reset, or reinstall actions.

  • Register more than one MFA method and keep recovery contacts current.

FAQs About Common Login Answers

Can WPS Office fix this login & account issues issue directly? Only when the WPS steps match the formatting or file task. Account, activation, and cloud issues stay on the Microsoft side.

Should I reinstall Office before trying these steps? Not first. Confirm account, license, and the exact error before reinstalling.

What should I send to Microsoft Support? The affected account email, device type, Office version, exact error text, and screenshots with personal data hidden.

Algirdas Jasaitis

15 years of office industry experience, tech lover and copywriter. Follow me for product reviews, comparisons, and recommendations for new apps and software.