Customizing Toolbars

Each Office application includes an assortment of toolbars in addition to the Standard and Formatting toolbars. Some, such as Word's Outlining toolbar and Excel's PivotTable toolbar, appear automatically when you begin performing specific tasks. You can show specific toolbars and arrange them onscreen when they're needed and then hide them when you're finished working with them. In every Office application, you can also customize toolbars by adding and removing buttons, and you can create new custom toolbars that contain exactly the buttons and menu choices you specify.

Tip from

On a monitor with limited resolution, you might prefer to toggle between the one- and two-row settings for the Standard and Formatting toolbars. In Office XP, this option is always available by clicking the arrow at the right of either toolbar. This is a welcome change from Office 2000, which required that you dive into dialog boxes to adjust these settings.


Showing, Hiding, and Arranging Toolbars

To display or hide toolbars, right-click any visible toolbar or right-click the menu bar to see a list of commonly available toolbars, similar to the one in Figure 2.2. Click any item in the list to display that toolbar; click a checked item to hide the toolbar.

Figure 2.2. This list of toolbars shows only a subset of those that are actually available; use the Customize dialog box to see a more complete listing.


Curiously, not all available toolbars are shown on this pop-up list. If you work with a Word document in Normal view, for example, you'll see a selection of only 19 toolbars on this list, although 30 are actually available. To make any of these additional toolbars available, select Tools, Customize, and click the Toolbars tab (see Figure 2.3). Check the box next to any item on the list to make that toolbar visible.

Figure 2.3. This list of available toolbars offers more choices than the simple pop-up menu you see when you right-click a toolbar.


Tip from

If you use the Customize dialog box to display a nonstandard toolbar, you don't need to go through all those clicks to hide it again. If the toolbar is docked, grab its left edge and drag it into the program window so it floats, and then click the Close (X) button in the upper-right corner of the toolbar.


When working with toolbars, you have three positioning options:

  • You can dock any toolbar to any side of the screen. By default, for example, the Standard and Formatting toolbars are docked just below the menu bar in every application, and the Drawing toolbar attaches itself to the bottom of the screen. Click the sizing handle (the thin horizontal bar at the left or top edge of a docked toolbar) and drag the toolbar to any edge of the screen to snap it into its new position.

Tip from

Not all toolbars actually work properly when docked to the side of the screen. Some drop-down list controls, such as the Font and Style choices on the Formatting toolbar or the Line Style selector on the Borders toolbar, aren't visible on a side-docked toolbar, and pull-down menus can be harder to read when displayed sideways. Toolbars that contain only buttons, such as the Reviewing toolbar in Word, Excel, and PowerPoint, work best in this configuration.


  • You can dock two or more toolbars on the same edge, side by side, or one over the other. Drag the sizing handle to move a toolbar on its row.

  • You can also drag any docked toolbar into the application window to let it "float." This option is best suited for controls you use when designing forms and charts, creating macros, working with objects in the drawing layer, and editing PivotTables. In fact, Excel's PivotTable Field List toolbar does not allow you to dock it to the bottom of the screen because doing so would render it practically useless.

When you add more buttons to a toolbar than will fit in the current screen width, or when you dock two or more toolbars on the same row, there might not be enough room to display all buttons. In that case, the application shows only those buttons you have used most recently; click the down arrow at the right of the toolbar to see additional choices.

If you regularly use specific sets of toolbars, create macros that display and position the toolbars you want, and then clear them away as needed. Assign the macros to menus or buttons on the Standard toolbar for quick access.

Use the following code, for example, to show the Web and Drawing toolbars, with the Web toolbar floating and the Drawing toolbar docked to the bottom of the screen. The .Left and .Top properties define the starting point, in pixels, from the left edge and top edge for a floating toolbar:

Sub ShowFavoriteToolbars()
    With CommandBars("Web")
        .Visible = True
        .Position = msoBarFloating
        .Left = 300
        .Top = 400
    End With
    With CommandBars("Drawing")
        .Visible = True
        .Position = msoBarBottom
    End With
End Sub
						

To hide all toolbars except the Standard and Formatting, use the following code:

Sub HideAllToolbars()
On Error Resume Next
For Each cmdbar In CommandBars
    If cmdbar.Name = "Standard" Or cmdbar.Name = "Formatting" Then
        cmdbar.Visible = True
    Else
        cmdbar.Visible = False
    End If
Next
On Error Goto 0
End Sub

→ For a thorough introduction to the art and science of macros and VBA code, see "How Macros Work".

Adding and Removing Buttons

Instead of using personalized menus and toolbars, most expert users prefer to customize built-in toolbars, adding and grouping buttons they use most often. Click the Toolbar Options arrow at the right side of any toolbar and select Add or Remove Buttons to display the list of buttons available for that toolbar, as in Figure 2.4 (if you add a button, it appears on this list as well). A check mark next to any item on the list means that button is currently visible; click to toggle this check mark and display or hide the button.

Figure 2.4. Click the drop-down arrow at the right of any built-in toolbar to add or remove buttons easily.


When customizing the selection of buttons on a toolbar, you're not limited to choices on the Add or Remove Buttons menu. In any Office application, you can add any command, macro, or existing menu to a toolbar. In Word, you can add fonts, styles, and AutoText entries as well. Access users can also select from tables, queries, forms, and reports in the current database, plus Web pages and ActiveX controls.

To add a command to a toolbar, follow these steps:

  1. Select Tools, Customize (or right-click any toolbar or menu and choose Customize from the bottom of the shortcut menu). The Customize dialog box opens.

  2. If the toolbar you want to customize is not visible, click the Toolbars tab and check the box for that toolbar.

  3. Click the Commands tab, select an entry from the Categories list on the left, and then select the command you want to add from the Commands list on the right, as in Figure 2.5.

    Figure 2.5. Drag items from the list on the right side of this dialog box to create new toolbar buttons.

Note

The items in the Categories list typically correspond to top-level menu choices, built-in toolbars, and some collections of tools. Only Word includes an All Commands category that consists of an alphabetized list of every available command. If you're not sure what a particular command does, select it from the Commands list and click the Description button.


  1. Drag the command from the Customize dialog box to the toolbar where you want to add the button. When you see a thick black I-beam in the correct position, drop the button to add it.

  2. Repeat steps 3 and 4 to add more buttons to any toolbar.

  3. When you've finished working with the toolbar, click Close to put away the Customize dialog box.

If you never use certain toolbar buttons, clear them away to make room for the buttons you do use. It's ridiculously easy to remove a button from a toolbar: Point to the button you want to remove, and then hold down the Alt key as you drag it off the toolbar—when the pointer displays a tool icon with an X, release the mouse button to delete the item. If the Customize dialog box is open, you can remove any button or menu item by dragging it off the menu bar.

Tip from

Use these same drag-and-drop techniques to move buttons and menu items, either on the same toolbar or between toolbars. From any editing window, hold down the Alt key and drag a button to move it to a different place on the same toolbar or to a different toolbar altogether. With the Customize dialog box visible, hold down the Ctrl key and drag any button to create a copy. And here's an undocumented shortcut we guarantee you haven't read anywhere else: Hold down the Ctrl and Alt keys simultaneously as you drag a button to create a copy, either on the same toolbar or on another toolbar, without opening the Customize dialog box. This technique is especially effective if you want to create slightly different versions of the same toolbar for different tasks: Base one toolbar on an existing toolbar, and then modify the new copy and use macros to switch between them for different tasks.


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.94.249