Keeping the Styles Pane Open by Default

Written by Allen Wyatt (last updated January 18, 2023)
This tip applies to Word 2007, 2010, 2013, and 2016


9

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%.)

Note:

If you would like to know how to use the macros described on this page (or on any other page on the WordTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

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.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Deleting Duplicate Text Values

Got a list of data from which you want to delete duplicates? There are a couple of techniques you can use to get rid of ...

Discover More

Getting Rid of Custom Toolbars

If you start Word and get a bunch of unwanted toolbars displayed on the screen, you can be scratching your head (or ...

Discover More

Duplicating Styles without Dependency

Creating new styles in Word is a great way to ensure that your document has a uniform look. But what if you want to ...

Discover More

The First and Last Word on Word! Bestselling For Dummies author Dan Gookin puts his usual fun and friendly candor back to work to show you how to navigate Word 2013. Spend more time working and less time trying to figure it all out! Check out Word 2013 For Dummies today!

More WordTips (ribbon)

Searching for Text Not Using a Certain Style

Word is very flexible in what it allows you to search for. One thing it can't do, however, is allow you to search for ...

Discover More

Stopping Styles from Changing with Multiple Users

Using styles in your documents can be very helpful when it comes to consistency and ease of formatting. When others open ...

Discover More

Preserving Style Formatting when Combining Documents

Insert one document into another and you may not get the results you expect. Here's why, along with what you can do about it.

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 7 - 6?

2023-05-26 02:42:55

peter

I love this so much - I've found no other way to show nav and styles panes at the same time in 365.

One change I had to make was to move the active window into the with block:

Sub autoexec()
With Application
.TaskPanes(wdTaskPaneFormatting).Visible = True
.CommandBars("Styles").Position = msoBarRight
ActiveWindow.DocumentMap = True
End With
End Sub


2023-01-19 12:55:14

pete roth

Hi Allen! Hope you are all healthy!

This tip re the Styles pane requires a reference to the Microsoft Office 16.0 Object Library, which Word 2021 (I think that's what it is. Office 16, anyway) offers to add.


2022-03-17 05:48:09

Tony Barry

App.TaskPanes(wdTaskPaneFormatting).Visible = True

is not recognised on Mac running Word365 so none of these work.


2022-03-16 06:13:32

Leslie Eriksson

I copied your Anthony's macro
Sub DispSetup()
With Application
.TaskPanes(wdTaskPaneFormatting).Visible = True
.CommandBars("Styles").Position = msoBarRight
End With
ActiveWindow.DocumentMap = True
End Sub

and saved it and when I tried to invoke it or run it it just stared at me and did nothing


2021-03-03 09:46:16

Andrew

Jennifer, in that case the "AutoNew" macro is automatically called.

Andy.


2021-03-02 09:13:10

Jennifer Cuonzo

AutoOpen is not working when using File/New/Template and choosing the template. It does work when you just double-click on the template from it's location. How can I get it to display as soon as they open the template?


2019-11-18 17:35:10

DaveR

I can't get this macro to work on my Mac, I get a runtime error. Does it only work with Windows?


2017-06-10 09:36:38

Ken Endacott

What you want is to display the Styles pane when Word is initially loaded, when an existing document is loaded or when the user creates a new document. To cover all three you will need to program in VBA as follows.

These instructions are for placing the code in the Normal Template. They could be placed in an add-in template instead if you don’t want to change the Normal template.

1. From a blank document ALT + F11 to display the VBA Project window.
2. In the Project pane select Normal and expand it
3. Click Insert > Class Module. Rename the module to clsAppEvent in the Properties window. If the properties window is not visible then click View > Properties Window.
4. Copy the following into the Class module window:

Public WithEvents App As Word.Application
Private Sub App_DocumentOpen(ByVal Doc As Document)
App.TaskPanes(wdTaskPaneFormatting).Visible = True
End Sub
Private Sub App_NewDocument(ByVal Doc As Document)
App.TaskPanes(wdTaskPaneFormatting).Visible = True
End Sub
Private Sub App_WindowActivate(ByVal Doc As Document, ByVal Wn As Window)
App.TaskPanes(wdTaskPaneFormatting).Visible = True
End Sub

5. Click Insert > Module. This will create a module with a default name typically Module 1
6. Copy the following into the module:

Dim X As New clsAppEvent
Public Sub autoexec()
Set X.App = Word.Application
End Sub

7. CTRL + S to save the Normal template
8. Close Word. When you restart word then the styles pane will be displayed..


2017-06-10 05:46:27

Italophile

"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."

There is no need for a macro at all. To get the Styles pane to dock simply drag it to the edge of the window and it will dock.


This Site

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.

Videos
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.