Distributing Code Samples with the Code Librarian Viewer
This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.
The Code Librarian makes it easy to create libraries of sample code. The Code Librarian Viewer is provided as a redistributable read-only run-time version of the Code Librarian. By distributing the Code Librarian Viewer, your users can browse any code library created using the Code Librarian.
The Code Librarian Viewer makes it possible for users to search for code and copy it to their own projects. Because it is read-only, however, users will not be able to modify, add, or delete items using the Code Librarian Viewer.
Note You can use Microsoft Access to compress the code library database (.clb file) to reduce the size of the file. For details, see the Access online documentation.
To view a library using the Code Librarian Viewer
From the Start menu, point to Programs, then Microsoft Office XP Developer, and then Code Librarian Viewer.
**Note **The first time the Code Librarian Viewer is launched, there is no database attached. You must first add a database before you can use the Code Librarian Viewer.
From the File menu, select Open.
In the Open dialog box, browse to the location of the code librarian database you want to open and click OK.
The library is opened in the Viewer.
To distribute a library with the Code Librarian Viewer
- Create a code library using the Code Librarian in the Microsoft Development Environment. For details, see Creating a Code Library.
- Enter the categories, code snippets, and keywords as desired.
- Close the code library.
- Launch the Packaging Wizard. For details about the wizard, see Packaging Wizard.
- In the Identify Application and Package screen, select the code librarian file (.clb) as the main file for the package.
- In the Dependencies screen, click Add File.
- Browse to the location of the Code Librarian Viewer file (codelibviewer.exe) and add the file to your package. This file is installed by default to \Program Files\Microsoft Office Developer\CodeLibrarian.
- Continue with the wizard.
The Packaging Wizard will create a setup program that will install your code library and the Code Librarian Viewer on your user's computer.
See Also
Using the Code Librarian | Opening the Code Librarian | Creating Code Librarian Categories | Creating a Code Library | Customizing Code in the Code Librarian | Associating Keywords with a Code Item | Creating a Setup Package Using the Packaging Wizard