Buying for a Team? Gift This Course
Wishlisted Wishlist

Please confirm that you want to add Microsoft Word VBA Macro Programming - Introduction to your Wishlist.

Add to Wishlist

Microsoft Word VBA Macro Programming - Introduction

Everything you need to know to confidentally start writing your own macros to automate Microsoft Word processes.
4.5 (70 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
5,557 students enrolled
Created by Grant Gamble
Last updated 11/2015
$10 $95 89% off
4 days left at this price!
30-Day Money-Back Guarantee
  • 13 hours on-demand video
  • 1 Supplemental Resource
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Have a coupon?

The video tutorials in this course are designed to give you all the ammunition you'll need to start creating your own custom macros to automate Microsoft Word tasks and operations. Word users learn VBA macro programming for a number of reasons: some people are looking to enhance their career prospects; some are looking to save themselves time; others are aiming to save their company money and increase productivity.

Whatever your reasons for considering learning more about Word VBA macros, this course aims to equip you with everything you need to get started.

This course was last updated on November 2015 with the addition of a module aimed at providing further practice by guiding the user, step-by-step, through the creation of an interactive Word VBA solution.

Who is the target audience?
  • This course is aimed at users with an intermediate or advanced knowledge of Microsoft Word but with little or no knowledge of VBA programming.
Students Who Viewed This Course Also Viewed
What Will I Learn?
By the end of the training, you will have the knowledge required to start confidently writing VBA macros which automate procedures in Word and which will enhance your own profile as a Word user and a Word developer.
View Curriculum
  • The course is aimed at users of Microsoft Word 2013, 2010 or 2007, running on Windows XP, Windows 7 or Windows 8.
Curriculum For This Course
Expand All 73 Lectures Collapse All 73 Lectures 12:47:39
Getting Started
9 Lectures 01:07:44

What you can expect from this course.

Preview 03:51

This lesson outlines the skills that you need to have in place before you can comfortably write your own macros from scratch.

Preview 04:44

In this tutorial we will download the course files, then install a gobal template inside which we will be saving all of the macros which we will create during the course.


The developer tab contains all of the options you'll need to start working with Word VBA...

The Developer Tab and Macro Security

In this video, we'll look at recording a macro and then editing the code generated by the recorder.
Preview 13:55

In this video, we'll look at adding a button to the Quick Access Toolbar which launches a macro when clicked.

Attaching Macros to the Quick Access Toolbar

In this video, we'll look at how you assign a keyboard shortcut to a macro.

Assigning a keyboard shortcut to a macro

In this video, we'll look at editing code generated by the macro recorder when you record a macro.

Editing a Recorded Macro

The macro recorder is a great way to check syntax that you are unsure of: you simply use the recorder, then look at the code that's been generated.

The Benefits and Limitations of the Macro Recorder
Writing Macros in the Visual Basic Editor
8 Lectures 01:33:40

Microsoft Word contains an application called the Visual Basic Editor (VBE) which is used for editing VBA code... Within the VBE, the first window that you need to get used to is the Project Explorer.

Preview 17:54

In this video, we'll have a look at some of the other windows in the Visual Basic Editor.

Other VBE Windows and Toolbars

A macro is essentially a subroutine; so we'll be discussing the various types of subroutines that you can create inside a module.

Macros and Subroutines

In this video, we'll discuss some of the strategies you can use to find help on Word VBA topics.

Getting Help on VBA and the Word Object Model (Part 1)

Getting Help on VBA and the Word Object Model (Part 2)

In this two-part video, we'll look at how you can modify the way in which the Visual Basic Editor works by customizing the settings in the Tools > Options dialogue box.

Setting VBE Options (Part 1)

In this two-part video, we'll look at how you can modify the way in which the Visual Basic Editor works by customizing the settings in the Tools > Options dialogue box.

Setting VBE Options (Part 2)

The Project Properties settings allow to customize the way in which projects are displayed within the object browser.

Setting Project Options
Variables and Constants
8 Lectures 01:24:27

Variables are a facility found in all programming languages. They allow you to store information required by your programs and to refer back to that information, and modify it, at any time...

Initialising and Populating Variables

Although variable declaration is not compulsory in VBA, it is definitely recommended that you declare all variables that you intend to use...

Variable Data Types (Part 1)

Although variable declaration is not compulsory in VBA, it is definitely recommended that you declare all variables that you intend to use...

Variable Data Types (Part 2)

In this video, we'll look at declaring fixed length as well as variable length Strings; and we'll also look at a couple of VBA String functions.

String Variables

In this video, we'll look at a couple of useful number functions; and we'll also look at how VBA handles the distinction between raw numbers and formatted numbers.

Number Variables

In this video, we'll look at how VBA enables you to work with Date variables. (We'll also have a quick look at Boolean variables.)

Date Variables

You'll very often need to keep track of values which will always be the same as your code executes; these are the kinds of values which you store in constants, rather then in variables.

Declaring Constants

In this video, we'll talk about using variables to store references to the Document, Range, Table and Row objects.

Preview 08:36
Subroutines and Functions
5 Lectures 42:32

In this video, we'll discuss a technique which allows you to have one main sub-procedures which calls a series of subordinate sub-routines.

Defining and Calling Subroutines

In this video, we'll look at functions and how they differ from sub-routines. (The main difference is that functions can return a value.)

Defining and Calling Functions

In this video, we'll look at how you can make your functions more flexible by defining arguments, or parameters.

Passing Arguments

VBA allows you to make arguments optional; which means that, when you call the function or sub-routine, you can either supply a value, or you can simply omit it.

Using Optional Arguments

When you divide your code into various sub-procedures, the question of variable scope becomes important...

Variable Scope
Conditionals, Loops and Arrays
9 Lectures 01:39:31

We begin this section on conditional and looping statements with a look at the VBA If statement.

If Statements

The Select ... Case statement provides and alternative to If and ElseIf when testing for several possibilities.

Select Case Statements

The For ... Next loop allows you to execute several lines of code repeatedly, a given number of times.

For...Next Statements (Part 1)

For...Next Statements (Part 2)

As well as using a counter to control looping, it is also possible to use a condition...

Do…Loop Statements

While…Wend Statements

Array variables allow you to store a related set of values, rather than a single value, like the variables we have seen so far...

Using Array Variables (Part 1)

Using Array Variables (Part 2)

Dynamic arrays are used in situations where you are not sure how many elements you need to cater for or where the number of elements can vary as your code executes.

Preview 12:44
The Word Object Model
7 Lectures 01:31:40

This video gives an overview of how the Word object model functions, its key aspects and key components.

Preview 14:59

In this video, we look a bit more closely at the syntax involved when working with object methods.

Working with Object Methods

Properties are essentially the attributes of an object. However, to access these properties, you sometimes have to go via a child object...

Working with Object Properties

In this video, we'll look at the syntax for homing in on individual objects.

Referring to objects within a collection

In this video, we will look at why it is a bad idea to write code which selects and activates objects, rather than simply referencing them.

Referencing Versus Selection and Activation

Before creating a reference to an object, you need to be sure that it actually exists. In this video, we look at how you test for the existence of an object within a collection.

Testing for the Existence of an Object

In order to remove items from a collection, the logical thing to do is to loop through the collection and selectively delete certain items...

Removing Objects from a Collection
Events, Dialogs and UserForms
9 Lectures 01:58:30

In this first video, we will get an overview of how event programming works.

Overview of Event Programming

In this two-part video, we will see a practical example of how document events can be implemented within a Microsoft Word workflow.

Working with Document Events (Part 1)

Working with Document Events (Part 2)

Very often, you can simply avail yourself of Word's built-in dialogs, rather than having to reinvent the wheel and create your own user form.

Using Built-in Dialogs

In this video, we will take a closer look at creating a user form and adding various types of control to the user form.

Creating a UserForm (Part 1)

Creating a UserForm (Part 2)

In this two-part video, we'll create a series of event procedures, to convert the form that we created in the last video, into an interactive form.

Creating UserForm Event-Handlers (Part 1)

Creating UserForm Event-Handlers (Part 2)

When working with user forms you have to bear in mind that the user will not always enter data in the format, range or attributes that you want them to.

Validating User Input
Error Handling and Debugging
7 Lectures 01:14:19

Before you share your macro solutions with colleagues or clients, it's always a good idea to think about shielding them from any unpleasant surprises...

Implementing Error Handling

In this video, we will revisit Tools > Options and discuss the settings relating to error handling.

VBE Error Trapping Options

In this video, we'll look at a statement which tells VBA to simply ignore any errors that occur and attempt to carry on as though nothing has happened...

Using On Error Resume Next

The Err object is a resource that is built into VBA which provides information on errors, as they occur...

Using the Err object

In this video, we'll turn our attention to debugging; tracking down errors when you can't get your code to work properly...

Debugging via output

In this video, we'll talk about stepping through your code, in break mode.

Stepping through Code

The watch window provides a very convenient and dynamic method of exploring the values of expressions and variables while debugging code...

Using Watches to Monitor Values
Additional Step-by-Step Practice
11 Lectures 01:35:16

Creating the Launch Macro

Creating the UserForm

Listing File Names in the Listbox Control

Updating the Preview Text Box

Programming the Remove Button

Programming the Move Up and Move Down Buttons

Programming the Cancel Button

Programming the Main Action Button Part 1

Programming the Main Action Button Part 2
About the Instructor
4.4 Average rating
181 Reviews
8,496 Students
4 Courses
Developer, trainer and author

Grant Gamble is an experienced IT trainer, developer, consultant and author able to deliver a wide range of training courses. He has a vast experience of delivering public and on-site IT training content at different skill levels, to groups of varying sizes.

His UK company G Com Solutions Limited provide IT training courses and consultancy to a wide range of UK and international clients. His speciality is running week-long, intensive training workshops on topics like Microsoft VBA, web development and Adobe Creative Suite automation.

Report Abuse