View Single Post
 
Old 06-03-2023, 09:40 AM
Charles Kenyon Charles Kenyon is offline Windows 11 Office 2021
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 8,900
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

The following command works in Word 2010 but not in Word 365/2021.
Code:
application.commandbars("Styles").visible = True
I know that I posted in UserVoice about this some time ago.

Giving Feedback on Microsoft Word or other Microsoft Products

I just filed a new one and you are welcome to vote and comment on it.
Quote:
The vba command:
application.commandbars("Styles").visible = True
worked 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 position

The Visible Property can be changed with other commandbars.

This is a bug and should be fixed
Community
Reply With Quote