Subscribe to Windows IT Pro
July 17, 2001 12:00 AM

Customize the Places Bar

Windows IT Pro
InstantDoc ID #21539
Rating: (0)
Downloads
21539.zip

Automating Places Bar Customization
Listing 1 shows setplaces.vbs, a minimal VBScript application that automates reading and writing places. The script first asks you to specify the number of the place you want to modify. If you enter a number from 0 through 4, the script continues, asking you to click Yes if you want to specify a folder by path or No if you want to specify a folder by ID number. If you enter Yes, the script tells you to enter a pathname. After you do so, the script creates a REG_SZ registry entry. If you enter No, the script tells you to enter any system-file ID. After you do so, the script creates a REG_DWORD subkey. Next, the script updates the registry accordingly. After you enter one place, the script loops and asks you for another one.

Admittedly, setplaces.vbs doesn't do much error handling, and its UI is quite rough. If you want a richer application, you can easily turn the script into Visual Basic (VB) code.

Listing 2, page 109, shows the restoredefaultplaces.vbs script, which deletes the Placesbar subkey to restore the default places to the Places bar. As I mentioned, the Placesbar subkey doesn't exist unless you or an application creates it. Without a Placesbar subkey, the contents of the Places bar defaults to the standard folders.

The Office 2000 Places Bar
The registry changes that I've described affect applications that use the dialog boxes in the Win2K common dialog library. Office 2000 applications use dialog boxes from a custom library, so modifying the Win2K Open dialog box's Places bar doesn't have any effect on the bar in Microsoft Word and Microsoft Excel.

Fortunately, though, Office 2000 provides a way to personalize its Places bar. The pertinent registry subkey is HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Common\Open Find\Places; however, you don't need to know this subkey if you just want to customize the Places bar. Microsoft offers a handy tool that you can install in the Tools menu in Office 2000 applications and use to change the bar's places. The tool, places.exe, is an Office 2000 add-in that you can download from the Microsoft article "INFO: Places COM Add-In for Office 2000 Available for Download" (http://support.microsoft.com/support/kb/articles/q260/1/90.asp). The package comes with the complete VB source code for the add-in and a read-me.doc file that explains in detail how to use the facility.

After downloading the self-extracting places.exe file to a new folder, double-click it. Then, click Start, Run, type

regsvr32 <path>\places.dll

and click OK to register the only executable in the folder: places.dll. If at this point you have any Office 2000 program open, close it, then reopen it. The program's Tools menu will feature a new Set Places item that you can use to select new folders for the Places bar. Unlike Win2K applications, Office 2000 applications support small icons. If you choose this option, you can double the number of folders on the bar from 5 to 10. All the changes you make to the Places bar in one Office application apply to all Office applications.

The way to good software is paved with great intentions and sometimes also with handy tools. The Places bar is a time-saving feature, but you get the maximum benefit only if the listed places are folders that you frequently use. Now you have enough information to customize the bar in both Win2K and Office 2000.

Related Content:

ARTICLE TOOLS

Comments
  • Mark van Renswoude
    8 years ago
    Jun 22, 2004

    Excellent article. As a comment to brian: when adding the DWORD to the registry you forgot to switch it to Decimal in the dialog, it's set to Hex by default; 11 hex == 17 dec :)

  • Joshua Herzig-Marx
    8 years ago
    Jun 17, 2004

    If the path to places.dll contains spaces (as most will, by default), don't forget to put it in quotes:

    regsvr32 "C:\\Documents and Settings\\username\\Local Settings\\Temp\\Places\\Places.dll"

  • Dave
    8 years ago
    Jun 02, 2004

    Brian, the numbers are listed in this article as decimal, but the default mode when adding a new DWORD is hexadecimal (thus, 11 hex worked for you as "My Computer" because that is 17 decimal)

  • brian
    9 years ago
    Oct 23, 2003

    i was using the costmizing places bar page (http://www.winnetmag.com/Article/ArticleID/21539/21539.html) and trying it out but when i tryed to get My Computer to come up the table you list on the page (http://www.winnetmag.com/Files/21539/Table_01.html) didnt give me the right id. so i tryed differnt ids till i found out that 11 worked on my computer
    i run windows 2000
    i am just trying to inform you in hopes that one can be helpful
    one gets nowhere when everyone is to them slef about what they find

You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.