Microsoft Office 2000/Visual Basic Programmer's Guide   

Using the Code Samples

The Office 2000 Developer CD-ROM contains online versions of all the code samples in this guide, white papers that provide additional information about Microsoft Office programming topics, and several sample applications. This material is located in the ODETools\V9\Samples\OPG folder on the CD-ROM.

Code Samples

This guide contains hundreds of code samples that show how to work with the programming features of Microsoft Office. To help you learn about these features and incorporate them into your applications, the Office 2000 Developer CD-ROM contains electronic versions of the code samples used in the book. In addition, the samples subfolder for each chapter contains dozens of code samples that expand on the concepts and ideas presented in the book. Wherever possible, these code samples were written not only so you can learn from studying how they work, but also so that you can use them "as-is" in your custom solutions.

The code samples for the chapters are stored in the ODETools\V9\Samples\OPG\Samples subfolder on the Office 2000 Developer CD-ROM. The files for each chapter are stored in the subfolder corresponding to the chapter number; for example, the files for Chapter 3 are stored in the ODETools\V9\Samples\OPG\Samples\CH03 subfolder. In some cases, the samples for a particular chapter are used in other chapters as well.

To use the code samples

The code samples are designed to be executed from your hard disk. To make sure the samples work properly, you should use the setup program on the Office 2000 Developer CD-ROM to transfer the code samples to your machine.

  1. Insert the Office 2000 Developer CD-ROM in your CD-ROM drive.

  2. Double-click Setup.exe in the ODETools\V9\Samples\OPG folder of the Office 2000 Developer CD-ROM.

  3. The setup program creates an OPG folder in the root directory of your C drive, and then copies the directory structure of the Office 2000 Developer CD-ROM to the C:\OPG folder.

    Important   If you do not accept the default drive and path, you will need to modify some of the sample code to point to the drive and path where you installed the files.

    Because files stored on a CD-ROM must have their read-only file attribute set, the setup program also clears the read-only file attribute after copying the files.

Notes

For information about specific file names or additional requirements for the code samples in each chapter, see the discussion regarding a particular sample file in the text of each chapter.

White Papers

A number of white papers pertaining to the Office 2000 applications and the technologies they use are included in the ODETools\V9\Samples\OPG\Appendixes folder on the Office 2000 Developer CD-ROM. For a list of the white papers and their contents, see WhitePapers.txt in the ODETools\V9\Samples\OPG\Appendixes folder.

Sample Applications

Several sample applications are included in the Sample Applications folder on the Office 2000 Developer CD-ROM. Complete documentation for these applications is contained in ReadmeSamples.txt in the ODETools\V9\Samples\OPG\Sample Applications folder.