skip to navigation skip to content
Self-taught course

Provided by: University Information Services - Digital Literacy Skills


This course is self taught (Materials may be loaned out).

Bookings cannot be made on this course (Course is not taking bookings).

More information about UIS self-taught courses.

Booking / availability

Programming in VBA - Using Microsoft Word 2013

Self-taught course


The skills and knowledge acquired in Programming In VBA - Using Microsoft Word 2013 are sufficient to be able to create VBA applications in Microsoft Word 2013.

Target audience

Anyone who wants to learn the basics about VBA within the Word environment


Programming In VBA - Using Microsoft Word 2013 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.

Topics covered

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

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

Watsonia workbook with 148 topics. Files for the exercises are provided on a CD or can be downloaded here


Approximately 15 hours

Related courses

Booking / availability