Developing Solutions with Office 2000 Components and VBA, 1st edition

Unfortunately, this item is not available in your country.


The Professional's Guide to Developing Custom Solutions with Office 2000!

  • Develop custom applications with Office 2000
  • Exploit the power of the VBA language
  • Leverage the power of intranets and the Internet

Create custom business solutions with Office 2000 and watch your productivity soar.

Built right into the Microsoft Office applications on your desktop are more than 600 powerful software components and a full featured programming language, Visual Basic for Applications. You can use these tools to create custom applications to streamline your workflow and boost efficiency.

The six main Office applications-Word, Excel, Access, PowerPoint, FrontPage, and Outlook—all work on the object model. With this step-by-step guide, you'll quickly master the paradigm and get down to building the exact software that suits your needs. Working hands-on from the very start, you'll be building real applications and mastering real skills, such as:

  • Creating custom documents, charts, and reports
  • Designing customized visual interfaces
  • Controlling data access and managing security
  • Creating and publishing Web content
  • Automating e-mail tasks

You will work easily within the familiar Office framework to develop sophisticated business solutions with these simple, widely available tools.

Table of contents

(NOTE: Each chapter concludes with Summing Up.)


1. Why Develop with Office and VBA.

Advantages of Office Development. Office Is a Familiar Environment. Office Development Decreases Development Time and Expense. Office Provides an Integrated Solution. Office Development Is Extensible. Software Components. Objects and Components. Objects in Office. Properties. Methods. Events. The Office 2000 Suite. Word. Excel. Access. PowerPoint. Outlook. FrontPage. Shared Components. Data Access. Web Technologies. What's New in Office 2000. Web Integration. Virus Protection. Add-In Architecture. More Comprehensive Event Model. More Objects. New VBA Language Elements. Improved Data Access. Custom Help Files.

2. The Basics of Office Development.

Objects and Automation. The Component Object Model. How Automation Works. The Office Object Model. Collections. Designing Your Custom Application. A Simple Office Application.

3. Visual Basic for Applications-the Fundamentals.

Parts of the VBA Editor. Editing Window. Project Explorer. Properties Window. Working with Code. Using Modules. Writing Good Code. Adding References. Classes and Type Libraries. Securing Your Code. Preventing Unauthorized Access.

4. Working with Office Objects.

Objects and References. Object Variables. Creating New Objects. Referencing Existing Objects. Destroying Objects. Collections. Accessing Collection Members. Adding and Removing Collection Members. Finding Objects in the Object Hierarchy. Early Versus Late Binding. The Object Browser. Objects and Events.


5. Using Word Components.

The Word Object Model. The Document Object. Opening and Creating Documents. Saving and Closing Documents. Stories in a Document. Manipulating Document Content. Other Document Properties and Methods. The Application Object. Setting Word Options. Word Dialog Boxes. Windows and Panes. Events in Word. Document-Level Events. Application-Level Events. An Application-Level Event Example.

6. Using Excel Components.

Excel Overview. The Excel Object Model. The Workbook Object. Opening and Creating Workbooks. Saving and Closing Workbooks. Printing Workbook Contents. E-mailing a Workbook. Other Workbook Properties and Methods. The Worksheet Object. Adding and Deleting Worksheets. Copying and Moving Worksheets. The Range Object. Manipulating Worksheet Contents. Finding and Replacing Data. Sorting Data. Working with Charts. Chart Sheets Versus Embedded Charts. The Chart Object. The ChartWizard Method. Controlling Chart Appearance. The Application Object. Object References. Excel Options and Settings. Using the WorksheetFunction Object. Events in Excel.

7. Using Data Access Components.

Access Fundamentals. Data Access Technologies. The Access Object Model. Opening and Closing Access Applications. The AccessObject Object. Opening Reports, Forms, and Data Access Pages. Referring to Open Objects. The CurrentProject Object. The CurrentData Object. The Screen Object. The DoCmd Object. Access Options. Startup Properties. Working with Forms and Reports. Using Controls. Working with Data Access Pages. Creating Data Access Pages. Using Data Access Pages. Securing Databases. Startup Options. Database Passwords. Hiding VBA Source Code.

8. Using PowerPoint Components.

The Presentation Object. Creating and Opening Presentations. Saving and Closing Presentations. Presentation Templates. Slide Shows. The Slide Object. Shapes on Slides. Slide and Shape Ranges. The PowerPoint Application Object.

9. Using FrontPage Components.

FrontPage Overview. The Web Object. Working with Folders. Working with Web Pages. Creating, Opening, Moving, and Deleting Web Pages. Working with PageWindows. Working with Web Page Content. Dynamic HTML-Should You Use It?

10. Using Outlook Components.

Outlook Overview. The Application and NameSpace Objects. Manipulating Folders and Items. Working with Mail Messages. Using Received Messages. Creating and Sending Messages. Working with Message Recipients. Working with Address Books. Working with Attachments. VBA in Outlook. Events in Outlook.

11. Using the Office Shared Components.

Shared Components Overview. The Office Assistant. Displaying and Animating the Office Assistant. Using Balloons. The FileSearch Object. Command Bars. Document Properties.


12. Data Storage and Operators.

Basic VBA Syntax. The Line Continuation Character. Comments. Formatting Source Code. VBA Editor Options. Storing Data. Naming and Declaring Variables. Numbers. Text. Constants. Objects. True/False Values. Dates. The Variant Type. Arrays. User Defined Types. Enumerations. Variable Scope. Operators. The Assignment Operator. Mathematical Operators. String Operators. Comparison Operators. Logical Operators. Operator Precedence and Parentheses.

13. Conditional and Loop Statements.

Conditional Statements. If Then Else. Select Case. Loop Statements. For Next. For Each Next. Do Loop. The GoTo Statement.

14. Writing Procedures.

Types of Procedures. Defining a Procedure. Passing Arguments. Optional and ParamArray Arguments. Passing Arguments ByVal and ByRef. Variables in Procedures. Calling a Procedure. Named Arguments. Procedure Scope. Planning and Storing Procedures.

15. Working with Strings.

String Processing Summary. Asc. Chr. InputBox. InStr, InStrRev. InStrRev. LCase, UCase. Left, Mid (function), Right. Len. LTrim, RTrim, Trim. Mid (function). Mid (statement). MsgBox. Option Compare. Right. RTrim. Space. Str. String. StrComp. StrConv. Trim. UCase. Val.

16. Working with Dates and Times.

The Date Data Type. Creating Dates and Times. Adding and Subtracting Dates and Times. Getting Date and Time Information. Formatting Dates and Times.

17. Working with Files.

Overview. File Access. Opening Files. File Numbers. Closing Files. Using Sequential Files. Using Random Files. Using Binary Files. Working with Text Files. Object-Oriented Text File Manipulation. Traditional Text File Manipulation. File Management. Object-Oriented File Management. Traditional File Management.

18. Creating Custom Classes and Objects.

Why Create Classes? Class Module Fundamentals. Creating Class Properties. Read-Only Properties. Variant Properties. Multiple Argument Properties. Data Validation with Property Procedures. Creating Class Methods. Class Events. A Class Demonstration.

19. Creating User Forms.

Creating a User Form. User Form Properties. Adding Controls to a User Form. Working with Controls. User Form Code and Event Procedures. Change. Click. DblClick. Enter, Exit. KeyDown, KeyUp. KeyPress. MouseDown, MouseUp, MouseMove. Displaying, Using, and Hiding User Forms. A User Form Demonstration.


20. VBA Error Handling.

Writing Solid Code. Runtime Errors. Preventing Errors from Happening. Trapping Errors. On Error Resume Next. ADO Errors. Raising Errors. Class Module Errors. Returning Errors from Functions. Testing Your Error Handling Code. Error Logging. Dealing with Unanticipated Errors.

21. Debugging, Deploying, and Supporting Your Application.

Debugging Your Applications. Working with Breakpoints. Using Watches. The Locals Window. Controlling Program Execution. Using the Call Stack. Using the Immediate Window. Deploying Your Application. Supporting an Application with Online Help. Microsoft HTML Help. WinHelp 4.0.

22. Using the Windows API and Registry.

The Windows API. Declaring API Procedures. The API Text Viewer. Calling API Procedures. Strings and API Procedures. Using Callbacks. The Windows Registry. VBA Registry Functions. API Registry Functions.

23. Office Technologies for the Web.

Web Components Overview. Using the Web Components. Excel. Access. FrontPage. Other Web Page Editors. Using the Spreadsheet Control. Using the PivotTable Control. Using the Chart Control. Using the DataSource Control.


24. Web Publishing of a Multi-Author Compound Document.

The Scenario. Planning. Step 1: Keeping the Required Information. Step 2: Checking for Updates. Step 3: Assembling and Publishing the Document. Step 4: Possible Errors and Bugs. The Excel Spreadsheet. Writing Pseudocode. The SubDocument Object. The Main Application.

25. Numeric Processing and Graphing.

The Scenario. Planning. Creating the Workbook. Planning the Code. Potential Errors and Bugs. The Main Procedure. The Secondary Procedures.

26. Custom Report Generation.

The Scenario. Report Generation Basics. Structure of a Report. Adding Report Elements. A Demonstration.

Appendix: Keycode Constants and Values.


Published by Pearson (May 12th 2000) - Copyright © 2000