Main: 01633 256482

Programming In VBA Using Word

Course Code



3 days

Course Information

The skills and knowledge acquired in this course are sufficient to be able to create real life working VBA applications within Word. The learner will be able to work with VBA within the Word environment to program and automate document operations.

At the completion of this course you should be able to:

  • Understand the Word object model and VBA concepts
  • Work effectively with the main features of the VBA Editor window
  • Create procedures in VBA
  • Create and use variables
  • Create and work with user-defined functions
  • Use programming techniques to control the action taken by your program
  • Construct loops that repeat code according to different requirements
  • Identify and select specific text using code modules
  • Create and use code to undertake basic file management tasks
  • Create code to drive a user form
  • Write a variety of error handling routines
  • Use VBA code to display and use Word’s built-in dialog boxes

Understanding Word VBA

  • Programming in Microsoft Word
  • VBA Terminology Displaying the Developer Tab
  • The VBA Editor Screen
  • Opening and Closing the Editor
  • Understanding Objects
  • The Object Hierarchy
  • Viewing the Word Object Model
  • Using the Immediate Window
  • Working With Object Collections
  • Setting Property Values
  • Using the Object Browser
  • Programming With the Object Browser
  • Accessing Help
  • Code Glossary

Starting With Word VBA

  • Using the Project Explorer
  • Using the Properties Window
  • Using the Work Area
  • Viewing Other Panes
  • Working With Toolbars
  • Working With a Code Module
  • Running Code From the Editor
  • Setting Breakpoints in Code
  • Stepping Through Code


  • Understanding Procedures
  • Where to Write Procedures
  • Creating a New Sub Routine
  • Using IntelliSense
  • Using the Edit Toolbar
  • Commenting Statements
  • Indenting Code
  • Bookmarking in Procedures
  • Code Glossary


  • Understanding Variables
  • Creating and Using Variables
  • Explicit Declarations
  • The Scope of Variables
  • Procedure Level Scoping
  • Module Level Scoping
  • Understanding Passing Variables
  • Passing Variables by Reference
  • Passing Variables by Value
  • Understanding Data Types for
  • Variables
  • Declaring Data Types
  • Using Arrays
  • Code Glossary


  • Understanding Functions
  • Creating and Calling Functions
  • The MsgBox Function
  • Using MsgBox
  • The InputBox Function
  • Using the InputBox Function
  • Nesting Functions
  • Using Functions in Function
  • Procedures
  • Code Glossary

Decision Structures

  • The IF Statement
  • Using IF for Single Conditions
  • Using IF for Multiple Conditions
  • The Select Case Statement
  • Using the Select Case Statement
  • Using Select for Sets of Values
  • Using Select for Ranges of Values
  • Code Glossary

Looping Structures

  • For Loops
  • Looping With Specified Iterations
  • Looping for Each Item
  • Adding an Exit to a Loop
  • The Do Loop Statement
  • Looping With Unknown Iterations
  • Code Glossary

Working With Text

  • Understanding Text and Document
  • Components
  • Understanding the Story Range
  • Understanding the Selection Object
  • Using the Selection Object
  • Understanding the Range Object
  • Using Range Objects
  • Assignment – Inserting Text
  • Code – Inserting Text
  • Assignment – Displaying Text in a
  • Text Box
  • Code – Displaying Text in a Text Box
  • Understanding the Find Object
  • Assignment – Performing a Find Operation
  • Code – Performing a Find Operation
  • Code Glossary

Document Management

  • The Activate Open and Close Methods
  • Opening and Closing Documents
  • Understanding the Add Method
  • Understanding the Save Methods
  • Assignment – Creating and Saving Documents
  • Code – Creating and Saving Documents
  • Properties That Return Information
  • Functions That Return Information
  • Assignment – Getting Information
  • Code – Getting Information
  • Understanding Files Folders and Drives
  • Working With Files and Folders
  • Assignment – Displaying Files in a UserForm
  • Code – Displaying Files in a UserForm
  • Removing Files and Folders
  • The Application and Options Object
  • Code Glossary

Programming UserForms

  • Handling Form Events
  • Initialising a Form
  • Closing a Form
  • Creating Functions for a Form
  • Creating Code for Option Buttons
  • Assignment – Using the AfterUpdate
  • Event
  • Code – Using the AfterUpdate Event
  • Setting Bookmarks for Data Entry
  • Assignment – Using Bookmarks to
  • Enter Data
  • Code – Using Bookmarks to Enter
  • Data
  • Setting the Tab Order
  • Forcing Correct Entry
  • Templates and AutoStart Macros
  • Creating a Template With
  • AutoMacros
  • Code Glossary

Error Handling

  • Understanding Error Types
  • The on Error Statement
  • Simple Error Trapping
  • Using the Resume Statement
  • Using Decision Structures in Error Handlers
  • Assignment – Using the Err Object
  • Code – Using the Err Object
  • Assignment – Error Handling in Event Procedures
  • Code – Error Handling in Event Procedures
  • Defining Custom Errors
  • Code Glossary

BuiltIn 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
  • Assignment – Using Dialogs With a UserForm
  • Code – Using Dialogs With a UserForm


Programming in VBA – Using Microsoft Word 2016 assumes a good working knowledge of the software. The learner should be able to create and edit different kinds of documents and must also have a general understanding of personal computers and the Windows operating system environment and be able to use File Explorer to locate and copy files.

No formal assessment is required as part of this course.

The following will be included in this Programming in VBA using Word training course:

  • Detailed training notes
  • Course equipment (if required)
  • Experienced Instructor
  • Certificate
  • Refreshments

Dates and Prices for Programming in Word Using VBA

We currently have no public classroom courses scheduled, but would be more than happy to run this course for you. Please contact us using the form below and we will get back to you with some dates and prices.

4 + 6 =

Frequently Asked Questions

What time does the VBA course start and finish each day?

The Excel VBA training course starts at 9:15am and finishes at no later than 5pm each day.

Related Courses

Our registered office and postal address is 50 Commercial Road, Newport, Gwent, NP20 2PE

All quoted prices are exclusive of VAT for consumers who pay no VAT or can recover VAT. The current rate of VAT is 20% for consumers that are required to pay VAT.
All course bookings are subject to availability.