by Allen Wyatt
(last updated June 10, 2017)
Anthony regularly works with client's Word files that contain many styles, and each set of styles is different from client to client. It would be great if he could set the Styles pane to remain open and docked by default. Currently, the Navigation pane automatically opens and docks at the left side of the screen by default, which is great. He's had no luck, though, figuring out a way to make sure the Styles pane remains open. Whenever he starts Word or opens a document, the Navigation pane remains where he wants it, but the Styles pane needs to be manually displayed. Anthony wonders if there is any way to have both of these panes open, docked, and available by default each time a document is opened.
As Anthony has figured out, there is no way to display the Styles task pane, by default. Instead, you'll need to use a macro to display and position it. This macro will do the trick:
Sub DispSetup() With Application .TaskPanes(wdTaskPaneFormatting).Visible = True .CommandBars("Styles").Position = msoBarRight End With ActiveWindow.DocumentMap = True End Sub
The .TaskPanes(wdTaskPaneFormatting) property is the one that controls whether the Styles task pane is visible or not. Turning it on, however, is only half of the task—Anthony also wanted it docked at the right side of the document. This is where the .CommandBars("Styles") object comes into play. Setting the position of the object to msoBarRight places it exactly where it should be docked.
Note that this macro (DispSetup) must be executed every time you want to display and position the two panes. You could, if desired, change the macro to have the name AutoOpen, and then it would be run every time you start Word. You could also add more commands to the macro to have it adjust other display features, such as what zoom factor you commonly use. (I have a high-resolution monitor, so I normally set my zoom to somewhere between 150% and 200%.)
WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (5944) applies to Microsoft Word 2007, 2010, 2013, and 2016.
Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!
Word always relies on styles to define how text appears in your document. If you don't understand how Word applies styles, it ...Discover More
You can use the shortcuts described in this tip to quickly change the heading levels of the headings in your document. You'll ...Discover More
When you display the Home tab of the ribbon, Word shows a variety of styles in the Styles group. These are Style Sets, as ...Discover More
FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
Got a version of Word that uses the ribbon interface (Word 2007 or later)? This site is for you! If you use an earlier version of Word, visit our WordTips site focusing on the menu interface.