Click to open or copy the project files.
Presented by: Christine Solomon
Christine Solomon, who has been developing applications using Microsoft Office products since 1989 when she developed her first Microsoft Excel application, is a Director of Micro Modeling Associates, Inc., a Windows consulting firm that serves Fortune 500 and financial institutions. She is also author of the book from which this information is excerpted, Developing Applications with Microsoft Office (published by Microsoft Press).
© 1995 Christine Solomon
Phone: (212) 233-9890
Fax: (212) 233-9897
Internet: csolomon@panix.com
CompuServe: 74720,3446
OLE lets users create compound documents and developers create "compound applications." Just as compound documents include materials created in a variety of applications—charts from Microsoft® Excel, illustrations from CorelDRAW!, and sound from Sound Recorder—compound applications include both custom objects and objects from shrink-wrapped products. For example, an Access-based application might use Microsoft Excel's worksheet object as a financial calculation engine, or a Microsoft Excel-based application might use Word's WordBasic object to create a text processor. The ability to create compound applications—sometimes called inter-application programmability—provides developers with a new set of tools that leverages a company's investment in shrink-wrapped products.
That's the good news. The bad news is that the observation attributed to Gandhi regarding Western civilization—that it would be a good idea—also applies to OLE. Although you can certainly deliver OLE automation applications that incorporate two shrink-wrapped products, such applications often generate "out of memory" messages if users have other products open while running the custom application. Also, OLE automation applications that use shrink-wrapped products tend to perform slowly even on 486 PCs. On the other hand, OLE automation enables you to build applications that use custom business objects (built in C/C++ or Microsoft Visual Basic® version 4) in which the speed is such that performance is a nonissue.
There's also more good news. The latest release of the Microsoft Windows NT™ operating system and the next release of Microsoft Windows® (called Microsoft Windows 95) should, by and large, alleviate the problems that occur when using OLE automation with shrink-wrapped products.
Dynamic Data Exchange (DDE) is still the most widely-supported method of exchanging information among applications, because all applications that support OLE automation (and many that don't yet support it) support DDE. Chapter 12 of my book Developing Applications with Microsoft Office (published by Microsoft Press®) explains how to build integrated applications using DDE. (The text included here is excerpted from Chapter 11 of my book, Integrating Office Applications with OLE.)
I start by explaining what objects are, what OLE is, and how to program compound applications using OLE automation. I then present two applications that use OLE automation. I use these applications to address some of the programming techniques and practices that can help you develop professional business applications that integrate functionality from more than one shrink-wrapped product. These applications, which are included as sample files, are:
Note I discuss OLE automation as it relates to four products: Access, Microsoft Excel, Word, and Visual Basic. Other products support OLE automation, but I don't address them here.