INFO: Summary of Sample Applications on the ODK 1.0

ID: Q118817

The information in this article applies to:

SUMMARY

The Microsoft Office Developer's Kit (ODK) includes several useful samples for Visual Basic Programmers. This article summarizes the sample applications included in the ODK.

MORE INFORMATION

ChartDem: Demonstrates the Microsoft Excel 5.0 Chart Objects

ChartDem uses a Microsoft Visual Basic version 3.0 interface with the OLE control to display all of the objects related to Microsoft Excel charts. The user can select objects by name from drop-down lists or enable a timer that cycles through the objects.

The code for ChartDem demonstrates several OLE Automation techniques for integrating Visual Basic version 3.0 with Visual Basic for applications:

The application consists of two parts: a Visual Basic version 3.0 program, which manages the user interface, and a workbook, which contains all of the Visual Basic Applications Edition procedures used to change object properties. You can copy most of these procedures to Visual Basic version 3.0 and run them without making any code changes.

Encore: An Integrated Solution Using OLE and Microsoft Office

Encore is a sample application developed using Microsoft Visual Basic for applications and Microsoft Office. It is a forecasting tool for Encore Musical Instruments, an international firm. By using OLE, Encore demonstrates the ease in creating custom solutions among multiple applications.

From Microsoft Excel, Encore uses OLE Automation Objects and Visual Basic for Applications macros both to access sales-planning data in Microsoft Project and to create and distribute forecast reports in Microsoft Word. Another innovation of the Encore application is its use of pivot tables, a new feature of Microsoft Excel 5.0 that allows you to summarize large amounts of data using format and calculation methods of your choice.

Encore incorporates the functionality of Microsoft Excel version 5.0, Microsoft Word version 6.0, and Microsoft Project version 4.0.

FindXL: A Utility that Locates Hidden Instances of Microsoft Excel

Controlling OLE objects in Microsoft Excel from Microsoft Visual Basic version 3.0 is one of the many ways to use the OLE Automation capabilities of Microsoft Office to create custom applications. While developing and testing applications created in this way, a run-time error in Visual Basic version 3.0 may leave a hidden instance of Microsoft Excel running, invisible to the Task Manager. FindXL is a simple tool for locating such hidden instances and making them visible.

Visual Basic version 3.0 Professional Edition contains a tool, WPS.EXE, for finding and eliminating dynamic-link libraries and hidden executable files, but that tool provides neither a graceful exit nor an opportunity for examining the state of the hidden executable file. By making the hidden instance of Microsoft Excel visible, FindXL allows you to look at the property settings of the OLE objects at the time of the error.

The Visual Basic version 3.0 source code for FindXL demonstrates the use of the GetObject function with the Microsoft Excel Application object.

Help Desk: Demonstrates OLE Between Visual Basic and Microsoft Excel

The Help Desk sample application is a Microsoft Visual Basic version 3.0 program that demonstrates OLE functionality by manipulating Microsoft Excel 5.0 Automation objects. It is a way to effectively manage software support.

With this application, you can manage the names of software systems, information on technical service representatives using Help Desk, the names and phone numbers of contacts for whom the system is developed, and details of technical-service requests or calls about a system. An integral part of the application is the call-reporting functionality provided by an embedded Microsoft Excel 5.0 worksheet in which call data can be displayed and charted.

Help Desk was built using Microsoft Visual Basic version 3.0 and incorporates the functionality of Microsoft Excel version 5.0.

Invoice: Demonstrates OLE 2 Between Visual Basic 3.0 and Word 6.0

The Invoice sample application is a Microsoft Visual Basic version 3.0 program that demonstrates OLE functionality by manipulating Microsoft Word version 6.0 Automation objects to print invoices. For a single invoice, a form is printed using OLE Automation. The Microsoft Word Mail Merge feature is used when printing multiple (or batch) invoices.

An innovation of the Invoice application is its use of form fields, a new feature of Microsoft Word version 6.0 that allows you to print the invoice information as a custom form or as a preprinted form.

Invoice was built using Microsoft Visual Basic version 3.0 and incorporates the functionality of Microsoft Word version 6.0.

Mailing List: Demonstrates OLE Between Visual Basic 3.0 and Word 6.0

The Mailing List sample application is a Microsoft Visual Basic version 3.0 program that demonstrates OLE functionality by manipulating Microsoft Word version 6.0 Automation objects.

With this application you can manage the names and addresses of individuals, the names of mailing lists, and any association between them. It enables you to easily perform mail merge operations using the data records of individuals in a mailing list and a Microsoft Word version 6.0 document.

Mailing List was built using Microsoft Visual Basic version 3.0 and incorporates the functionality of Microsoft Word version 6.0.

MenuDemo: Demonstrates Various Microsoft Excel Objects

MENUDEMO.XLS is a Microsoft Excel workbook that demonstrates manipulation of several of the OLE Automation objects exposed by Microsoft Excel, using Visual Basic, Applications Edition. Most of the procedures in the workbook are excerpts from the object reference topics in "Programming Integrated Solutions with Microsoft Office," Chapter 4, "Microsoft Excel Objects."

The workbook contains modules and worksheets illustrating the following objects:

MenuDemo incorporates the functionality of Microsoft Excel version 5.0.

Northwind Management System: An Integrated Solution Using Microsoft Office

The Northwind Traders Management System sample application demonstrates how to program an integrated solution using the following applications:

The Northwind Traders Management System provides a top-down view of the Northwind Traders business data. It enables employees of this fictitious company to keep track of important corporate data so they can make better decisions about everything from manufacturing and inventory to product marketing.

The data resides in a Microsoft Access database (NWIND.MDB) and is shared with a Microsoft Excel workbook (NWIND.XLS). The sample application displays and manipulates this data using OLE Automation objects and code that resides in a Visual Basic application (NWIND.EXE). News articles are displayed using Microsoft Word (NWIND.DOC) in an OLE Automation object.

The Northwind Traders Management System application was built using Microsoft Visual Basic version 3.0 and incorporates the functionality of Microsoft Excel version 5.0, XLODBC.XLA, and Microsoft Word version 6.0.

OLEDB: Demonstrates Storing and Retrieving OLE Objects in a Database

NOTE: This reference to OLEDB is just a sample named OLEDB and does not have anything to do with OLE DB technology introduced by Microsoft.

The OLEDB sample application is a Microsoft Visual Basic version 3.0 program that demonstrates OLE functionality by manipulating data access objects. OLEDB allows you to add, delete, view, and edit OLE objects in a Microsoft Access database. The database can contain Word documents, Microsoft Excel spreadsheets, wave files, bitmaps, text files, and so on.

OLEDB demonstrates the use of the Visual Basic GetChunk() and AppendChunk() methods to store and retrieve large amounts of data in a Microsoft Access binary field. The OLEDB.BAS file contains reusable Visual Basic routines for storing and retrieving OLE objects, files, or any other data.

OLEDB was built using Microsoft Visual Basic version 3.0.

SetObjNm: A Single Function that Changes Object Names in Microsoft Excel

SETOBJNM.XLA is a simple but useful example of an add-in. Its purpose is to make it easy to change the default name of a graphic object, such as a button on a dialog sheet, from "Button 2" to "cmdOK" or whatever your coding standards dictate. On installation, the add-in puts a toolbar button on the Forms toolbar, using the ToolTip text "Set Object Name." Selecting a graphic object and clicking the Set Object Name button displays the default name of the object and allows you to change it.

The source file, SETOBJNM.XLS, demonstrates the following:

A second workbook, SETOBJN1.XLS, contains code from the EditBox reference section in "Programming Integrated Solutions with Microsoft Office," Chapter 4, "Microsoft Excel Objects." It demonstrates the same functionality as the add-in, but uses an uncompiled workbook.

SetObjNm incorporates the functionality of Microsoft Excel version 5.0.

VisiBase: Demonstrates OLE Between Visual Basic 3.0 and Microsoft Word 6.0

The VisiBase sample application is a Microsoft Visual Basic version 3.0 program that demonstrates OLE functionality by manipulating Microsoft Word version 6.0 Automation objects.

This application enables you to modify data about each employee in a company, including a scanned photograph of the employee and a brief biography. This data, along with the photo, is automatically inserted into a Microsoft Word template, ready for publication in a company newsletter. The same Visual Basic front end could be used, with minor modifications, to automate the creation of security ID badges, a yearbook, and so on.

VisiBase was built using Microsoft Visual Basic version 3.0 and incorporates the functionality of Microsoft Word version 6.0.

Additional query words: examples programs

Keywords          : kbprg IAPOLE vbwin 
Version           : WINDOWS:3.00
Platform          : WINDOWS
Issue type        : kbinfo

Last Reviewed: September 30, 1997