Share via

Bug Report - vba CommandBars("Styles").Visible = True throws error - can use TaskPanes(wdTaskPanesFormatting).Visible instead, though

Charles Kenyon 167.8K Reputation points Volunteer Moderator
2023-06-03T16:47:55+00:00

[EDIT: I still think this is a bug, but have found a workaround using the TaskPanes collection wdTaskPanesFormatting which will respond to a change in visible.] There is still no way to change the width of the pane using vba.

This report was filed as feedback in the feedback portal.

https://feedbackportal.microsoft.com/feedback/idea/56f2dbca-2c02-ee11-a81c-000d3a7a48db (deleted on Feedback Forum?)

New report filed at: https://feedbackportal.microsoft.com/feedback/idea/1a0b63aa-d4d1-ef11-95f5-6045bdb154fd

I invite votes and comments.

The vba command: application.commandbars("Styles").visible = Trueworked fine through Word 2013, at least, and now throws an error. *Runtime error -21474672259 (80004005) Unspecified error**It can also show error Method 'Visible' of object 'CommandBar' failed. -21474672259 (80004005)*This is to force display of the Styles Pane in Word.? application.commandbars("Styles").visible in the immediate window will report True or False? application.commandbars("Styles").position will give a positionThe Visible Property can be changed with other commandbars.See https://www.msofficeforums.com/word/50936-display-navigation-styles-panes-365-2021-a.htmlThis is a bug and should be fixed

Microsoft 365 and Office | Word | For home | Other

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

2 answers

Sort by: Most helpful
  1. Charles Kenyon 167.8K Reputation points Volunteer Moderator
    2025-01-13T17:36:31+00:00

    The original filing on the Feedback Forum seems to have been deleted.

    Here is an updated feedback portal link. https://feedbackportal.microsoft.com/feedback/idea/1a0b63aa-d4d1-ef11-95f5-6045bdb154fd

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  2. Charles Kenyon 167.8K Reputation points Volunteer Moderator
    2023-06-05T01:53:44+00:00

    While the TaskPanes collection can be used to change visibility, there is still no way to change the width property using vba. CommandBars("Styles").Width setting is ignored and there is no Width property for the TaskPanes.

    Was this answer helpful?

    0 comments No comments