| |
| |
Preface | |
| |
| |
| |
Introduction | |
| |
| |
| |
Preliminaries | |
| |
| |
What Is a Programming Language? | |
| |
| |
Programming Style | |
| |
| |
| |
The VBA Environment | |
| |
| |
| |
The Visual Basic Editor, Part I | |
| |
| |
The Project Window | |
| |
| |
The Properties Window | |
| |
| |
The Code Window | |
| |
| |
The Immediate Window | |
| |
| |
Arranging Windows | |
| |
| |
Document Events | |
| |
| |
| |
The Visual Basic Editor, Part II | |
| |
| |
Navigating the IDE | |
| |
| |
Getting Help | |
| |
| |
Creating a Procedure | |
| |
| |
Run Mode, Design Mode, and Break Mode | |
| |
| |
Errors | |
| |
| |
Debugging | |
| |
| |
Macros | |
| |
| |
| |
The VBA Programming Language | |
| |
| |
| |
Variables, Data Types, and Constants | |
| |
| |
Comments | |
| |
| |
Line Continuation | |
| |
| |
Constants | |
| |
| |
Variables and Data Types | |
| |
| |
VBA Operators | |
| |
| |
| |
Functions and Subroutines | |
| |
| |
Calling Functions | |
| |
| |
Calling Subroutines | |
| |
| |
Parameters and Arguments | |
| |
| |
Exiting a Procedure | |
| |
| |
Public and Private Procedures | |
| |
| |
Referencing a Project | |
| |
| |
| |
Built-in Functions and Statements | |
| |
| |
The MsgBox Function | |
| |
| |
The InputBox Function | |
| |
| |
VBA String Functions | |
| |
| |
Miscellaneous Functions and Statements | |
| |
| |
| |
Control Statements | |
| |
| |
The If ... Then Statement | |
| |
| |
The For Loop | |
| |
| |
The For Each Loop | |
| |
| |
The Do Loop | |
| |
| |
The Select Case Statement | |
| |
| |
A Final Note on VBA | |
| |
| |
| |
Objects and Object Models | |
| |
| |
| |
Object Models | |
| |
| |
Objects, Properties, and Methods | |
| |
| |
Collection Objects | |
| |
| |
Object Model Hierarchies | |
| |
| |
Object Model Syntax | |
| |
| |
Object Variables | |
| |
| |
| |
The Word Object Model | |
| |
| |
The Word Object Model: A Perspective | |
| |
| |
Word Enums | |
| |
| |
The VBA Object Browser | |
| |
| |
| |
The Application Object | |
| |
| |
Properties and Methods | |
| |
| |
The Options Object | |
| |
| |
The Task Object | |
| |
| |
The Template Object | |
| |
| |
The Window Object | |
| |
| |
The Pane Object | |
| |
| |
The View Object | |
| |
| |
The Zoom Object | |
| |
| |
| |
The Document Object | |
| |
| |
Properties That Return Collections | |
| |
| |
Spelling-Related Properties and Methods | |
| |
| |
The Documents Collection | |
| |
| |
Adding, Opening, and Saving Documents | |
| |
| |
Password-Related Properties | |
| |
| |
Protection-Related Properties and Methods | |
| |
| |
The Name Properties | |
| |
| |
Printing-Related Methods | |
| |
| |
Additional Members of the Document Object | |
| |
| |
Children of the Document Object | |
| |
| |
Example: Printing Document Headings | |
| |
| |
Example: Finding Used Styles | |
| |
| |
| |
The Section and HeaderFooter Objects | |
| |
| |
Adding a New Section | |
| |
| |
The PageSetup Object | |
| |
| |
Properties of the Section Object | |
| |
| |
The HeaderFooter Object | |
| |
| |
| |
The Range and Selection Objects | |
| |
| |
Comparing the Range and Selection Objects | |
| |
| |
Range and Selection Variables | |
| |
| |
Creating a Range or Selection Object | |
| |
| |
Changing a Range Object | |
| |
| |
Range and Selection Object Properties and Methods | |
| |
| |
| |
The Find and Replace Objects | |
| |
| |
Searching for Text | |
| |
| |
Searching for Formatting | |
| |
| |
The Replace Operation | |
| |
| |
The Execute Method | |
| |
| |
Example: Repeated Searching | |
| |
| |
| |
The Table Object | |
| |
| |
Formatting-Related Properties and Methods | |
| |
| |
The Cell Method | |
| |
| |
The Columns and Rows Properties | |
| |
| |
The ConvertToText Method | |
| |
| |
Sorting Methods | |
| |
| |
The Split Method | |
| |
| |
Example: Creating Tables from Word Lists | |
| |
| |
Example: Closing Up a Table | |
| |
| |
| |
The List Object | |
| |
| |
List Types | |
| |
| |
The List Object | |
| |
| |
The ListTemplate Object and ListGalleries | |
| |
| |
Example: Looking at Lists | |
| |
| |
| |
Shortcut Key Bindings | |
| |
| |
Finding a Key Binding | |
| |
| |
Creating a Key Binding | |
| |
| |
The KeyBinding Object | |
| |
| |
| |
Built-in Dialog Objects | |
| |
| |
The Show Method | |
| |
| |
The Display and Execute Methods | |
| |
| |
The DefaultTab Property | |
| |
| |
The Type Property | |
| |
| |
The Update Method | |
| |
| |
Example: Printing Document Statistics | |
| |
| |
| |
Custom Dialog Boxes | |
| |
| |
What Is a UserForm Object? | |
| |
| |
Example: Adding a Closing to a Letter | |
| |
| |
Example: A Fax Cover Sheet | |
| |
| |
Example: Quick Selection | |
| |
| |
| |
Menus and Toolbars | |
| |
| |
An Overview | |
| |
| |
CustomizationContext | |
| |
| |
The CommandBars Collection | |
| |
| |
The CommandBar Object | |
| |
| |
Command Bar Controls | |
| |
| |
| |
Appendixes | |
| |
| |
| |
Programming Word from Another Application | |
| |
| |
| |
The Shape Object | |
| |
| |
| |
Getting the Installed Printers | |
| |
| |
| |
High-Level and Low-Level Languages | |
| |
| |
Index | |