Private Sub App_DocumentOpen(ByVal Doc As Document)Īpp.TaskPanes(wdTaskPaneFormatting).Visible = True Public WithEvents App As Word.Application Copy the following into the Class module window:
If the properties window is not visible then click View > Properties Window.Ĥ. Rename the module to clsAppEvent in the Properties window. In the Project pane select Normal and expand itģ. From a blank document ALT + F11 to display the VBA Project window.Ģ. They could be placed in an add-in template instead if you don’t want to change the Normal template.ġ.
These instructions are for placing the code in the Normal Template. To cover all three you will need to program in VBA as follows. 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. (I have a high-resolution monitor, so I normally set my zoom to somewhere between 150% and 200%.) You could also add more commands to the macro to have it adjust other display features, such as what zoom factor you commonly use. You could, if desired, change the macro to have the name AutoOpen, and then it would be run every time you start Word. Note that this macro (DispSetup) must be executed every time you want to display and position the two panes. Setting the position of the object to msoBarRight places it exactly where it should be docked. CommandBars("Styles") object comes into play. Turning it on, however, is only half of the task-Anthony also wanted it docked at the right side of the document. TaskPanes(wdTaskPaneFormatting) property is the one that controls whether the Styles task pane is visible or not. CommandBars("Styles").Position = msoBarRight TaskPanes(wdTaskPaneFormatting).Visible = True Instead, you'll need to use a macro to display and position it.
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.Īs Anthony has figured out, there is no way to display the Styles task pane, by default. 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. He's had no luck, though, figuring out a way to make sure the Styles pane remains open. Currently, the Navigation pane automatically opens and docks at the left side of the screen by default, which is great. It would be great if he could set the Styles pane to remain open and docked by default. Any subsections will also move with it.Anthony regularly works with client's Word files that contain many styles, and each set of styles is different from client to client. The heading and all the text below it will be moved. Just click and hold the left mouse button on the heading of the section you want to move and drag it to a new place on the navigation pane. The Navigation Pane also has a very handy drag and drop feature.Use the Delete to delete both a heading and the content that is under that heading.Use Print Heading and Content to print out only specified sections of the document.Their subheadings will also change correspondingly and so will the look of the heading. Use the Promote and Demote tools to change the level of individual headings.Use the Expand All, Collapse All and Show Heading Levels tools to control how many levels of subheadings you see.Right clicking on any of the headings in the Navigation Pane brings up the right click menu which has some handy tools.Use the right click menu to control what you see, change heading levels and print and delete specific sections Clicking on any of the headings takes you straight to that part of the document so you can use it as a quick way to get around a large document.
Use the Navigation Pane to get around your document
This posting explains how to use these features in Word. It allows you to see your document structure, change the levels of headings easily and rearrange sections of work with a simple drag and drop action. The Navigation Pane in Word is a really neat tool when you are working with any document that contains several (or more) sections.