VBA for Microsoft Word 2010
Duration
2 daysMeals Provided
Lunch and refresmentsPrint-Friendly
Print this pageDelivery Methods
In-house, Closed GroupSkills Assessment
Take the test
Expected Outcomes
- Create Macros in Microsoft Word and understand the Word object model and Visual Basic Applications (VBA) concepts
- Create command procedures, create and use variables and create and work with functions
- Use decision structures to control outcome and looping structures to repeat sections of code
- Work with a range of objects and customise the way files and folders are managed
- Create a custom form complete with controls and event procedures
- Create code to drive a UserForm and write a variety of error handling routines
Prerequisites
This course is designed for people with little or no knowledge of VBA, however an advanced knowledge of Word is essential including creating a basic macro.
Who Should Attend this Course
This course has been developed for people who want to use VBA in Microsoft Word to automate functions within documents.
Topics Covered [Click to Show All]
Setting Macro Security Level
Recording a Simple Macro
Running, Assigning and Modifying a Macro
Create, Edit and Delete a Custom Menu
Creating a Macro Button Field
Tips for Developing Macros
Understanding VBA
VBA Terminology
Using the Immediate Window
Object Collections
Setting Property Values
Using the Object Browser
Programming with the Object Browser
Using the VBA Editor
Opening and Closing the Editor
The Project Explorer
The Properties Window and The Work Area
Code Module
Procedures
Creating a Command Procedure
Making Sense of IntelliSense
Commenting Statements
Indenting Code and Bookmarking in Procedures
Using Variables
Implicit and Explicit Declaration
The Scope of Variables
Procedure and Module Level Scoping
Passing Variables by Value
Declaring Data Types
Using Arrays and Intrinsic Constants Functions
Creating and Calling Functions
The MsgBox Function and Sending Messages to the User
Input Techniques
Using the InputBox Function
Nesting Functions and Function Procedures
Decision Structures
The IF Statement
Using IF for Single and Multiple Conditions
The Select Case Statement
Using Select for Sets of Values
Selecting for Ranges of Values
Looping Structures
Known or Specified Iterations
Looping for Each Item
Adding an Exit to a Loop
The Do Loop Statement
Unknown Iterations
Text and Document Components
The Story Range
The Selection and Range Object
Inserting Text
Displaying Text in a Text Box
Document Management
Opening and Closing Methods and Documents
The Ad Method
The Save and SaveAs Methods
Returning and Getting Information
Files Folders and Drives
Displaying Files in a UserForm Creating Custom Forms
Adding Text Boxes to a Form
Text Box Control Properties
Adding a Combo Box Control and Option Buttons
Adding Command Buttons
The Appearance of Controls
Running a Custom Form
Programming UserForms
Initialising and Closing a Form
Functions for a Form and Coding Option Buttons
Using the After Update Event
Bookmarks for Data Entry
Bookmarks to Enter Data
Setting the Tab Order
Forcing Correct Entry
Template AutoStart Macros
Error Handling
Error Types
The On Error Statement
A Simple Error Handler
Using the Resume Statement
Decision Structures in Errors
Using the ERR Object
Defining Custom Errors
Built-In Dialogs
The Dialogs Collection
Dialog Box Arguments
Using the Execute Method
Using the Show Method
The Display Method
Using the Display Method
Working with Dialog Tabs
Using Dialogs with a UserForm
“My word, your Word VBA course was marvellous - enlightening whilst practical!”
Gillian – Education Industry







Odyssey Training is a national Australian provider of professional, technical and management training and consultancy. We run customised training and scheduled training courses in Brisbane, Cairns, Melbourne, Sydney and Townsville. We have been a major outsource partner for local and national projects across the private and public sectors. Quality Assurance System conforming to AS/NZS ISO 9001:2008 (Certification no. 1075). Odyssey Training is also a signatory to the Government’s Information Technology Conditions v5 (GITC v5) – Q-953.