Downloads
22333.zip

Can I put several buttons on the Outlook Bar for the same folder, each showing a different view?

No, the Outlook Bar buttons don't let you apply a particular view to a folder. You can make it easier to switch views, though, by putting the Current View command on a toolbar rather than by using the command on the View menu. Choose View, Toolbars, Customize, then drag the Current View command from the View list in the Commands tab to any toolbar. Close the Customize dialog box when you've finished.

You can also restrict the folder so that it shows only your customized views. Choose View, Current View, Define Views, and select the Only show views created for this folder check box at the bottom of the Define Views dialog box.

Another technique is to use a little Outlook 2002 or Outlook 2000 Visual Basic for Applications (VBA) code to create a toolbar that has a button for each view. Press Alt+F11 to start the VBA environment, then choose Insert, Module to create a new code module. Name the module Views, then add the code that Listing 1 shows. The ShowView subroutine changes the view on the current folder to whatever view you pass to the procedure with the strViewName argument. If the folder has no view by that name, nothing happens.

To use ShowView, create a separate subroutine for each view that you want to put on a toolbar. The ShowTasksOnly and ShowMailOnly procedures are just examples that show how to display views named Tasks Only and Mail Only that you might have in your Journal folder. You would need to change the argument for ShowView to the name of an actual view on your folder.

After you create a subroutine for each view, you use View, Toolbars, Customize to drag the macros from the Macros list on the Commands tab to an existing toolbar. You can even create a new Views toolbar on the Toolbars tab of the Customize dialog box.