Duration
2 days
Objectives
Enable delegates to start developing Word-based applications, using VBA:
- Familiarise with the VBA Editor and environment
- Learn to write code in the VBA language
- Explore the Word object model and the Word VBA library.
Prerequisites
Delegates should have experience of using Word to a good intermediate level, being familiar with the use of styles, tables, bookmarks, etc.
Topics
- Introduction: Why VBA?
- The VBA Editor
- Project Explorer
- Code Window
- Immediate Window
- Object Libraries & the Object Browser
- A First Procedure
- Getting Code from Elsewhere
- VBA Code
- More on Variables & Types
- Control constructs: conditionals, loops
- Procedures: subs and functions
- Comments, etc.
- Debugging
- Setting breakpoints
- Debug Mode
- Locals and Watch windows
- Exploring the Word object model
- Collections and object references
- Application, Document
- Range, Selection
- Style
- Table
- Programming Word Forms
- Designing a Form
- Form Properties
- Form and Control events
- Controlling Controls
- Using Forms
- Cover Sheet information
- Template selection
- Control Panel
- Diary document
- Error Handling
|