This advanced Word VBA macro programming course is designed for users who are already comfortable with the basics of Word VBA macros, and who have progressed beyond relying on the Macro Recorder.
If you are still new to Word VBA, have a look at the Udemy course "Microsoft Word VBA Macro Programming – Introduction".
This advanced Word VBA course carries on from where the above Introductory course finishes.
The main purpose of this course is to take a deep dive into programming the Word VBA object model; but in a practical, hands-on kind of way.
Here’s a summary of what you will learn:
So, by the end of this course, you will have a good grasp of all of the intermediate and advanced Word VBA programming techniques that you'll need to master, in order to feel comfortable when undertaking Word VBA projects; either in the workplace, or as a consultant.
In this video we examine how to use the Application.UserName property when interacting with the user.
In this lecture, you will learn how to use the properties of the Application.System object to verify the user's country, and screen resolution.
In this lecture, we learn how to use the Application.OnTime method to schedule the running of a macro at a specified time.
After watching this video, you will know how to use the VBA Dir function to process all of the files in a given folder.
In this video tutorial, we will look a the VBA code for examining all of the files in a folder and archiving all those whose modification date is older than a certain threshold.
In this video, we take a step-by-step look at how Word's document collection behaves, as documents are added and removed using the New, Open and Close methods.
In this video, we look at how to loop through the documents collection and test to see whether a give file is currently open.
In this tutorial we look at how the documents collection is modified by the Add, Open and Close methods of the Document object.
In this tutorial, you will gain a deeper understanding of the similarities and differences between the Selection and Range objects, as well as the benefits of using the range object when writing VBA code.
This video explains how to use the Selection.Type property to gauge whether the user has made the kind of selection required for a particular macro to run successfully.
In this video, you will learn how to use the Selection.Story property to verify whether the user has made a selection in the main area of the page or within a header or footer.
In this tutorial, we examine the very versatile Information property which is available on both the Range and Selection objects; and how it can be used to test whether the user's current selection is within a table. We then move on to using it to verify whether the Caps lock is currently active.
Here, we examine the Paragraph object and how the properties of it parent, the Paragraphs collection can often be used directly without the need of looping through individual paragraphs.
Now we drill down inside the Paragraph object and discuss the Sentences, Words and Characters collection objects and the Range objects which they all contain.
Copying text is a frequent requirement with Word VBA macros. In this video, you will learn how to copy text cleanly, and without interfering with the contents of the user's clipboard.
In this video, you will discover how to use the methods of the Range object to insert new text into a document.
In this tutorial, you will learn how to use the methods and properties of the Range.Find object to find and replace text within a document.
Here, we look at the using the Range.Case property, the equivalent of Word's Change Case command. We then move onto creating an intelligent title case macro, which does not capitalize unimportant words, such as "the".
In this video, we look at the intricate code involved when working with lists. You will learn how to create and format both numbered and bulleted lists using VBA.
In this video, we discuss the formatting of text using VBA. You will learn to distinguish between those formatting properties which are accessed using the Range.Font object, and those provided by Range.ParagraphFormat.
In this tutorial, we look at how the Style property/object to control the formatting of Paragraph, Range and Selection objects. We also examine the properties of the style object itself; and discuss how VBA distinguishes between paragraph and character styles, as well as between Word's built-in styles and user-defined ones.
In this video, we'll look at the VBA code involved in creating and updating Microsoft Word tables of contents.
We begin this chapter by talking about the VBA code needed to create new sections; and how to specify key attributes of the new section, such as the number of columns.
In this tutorial, we discuss the PageSetup object, which is a property of both the Document and Section objects.
In this video, and in the remaining videos in this chapter, we examine the manipulation of headers and footers using VBA code.
This tutorial explains how to use the LinkToPrevious property to programmatically determine whether you have different headers and footers in the different sections of the same document.
In this tutorial, we examine the VBA code required to allow headers and footers on the left and right pages of a document to have different attributes and content.
We've already encountered page numbers in a couple of the videos within this section. In this tutorial, we'll talk a bit more about page numbers; and how you can use VBA to customize them.
From a programming point of view, you may often need to create tables in your VBA workflows; whenever you want the output to be in a tabular format. In this tutorial, we will examine the VBA syntax for creating tables.
In this tutorial, you will learn the two main VBA techniques for merging table cells; merging entire rows or columns; and merging from one individual cell to another.
In this video, we'll look at the VBA syntax for formatting tables; using both by the Table.Style property and by customizing the Borders and Shading properties.
In this tutorial, you will create a macro which scans a document for tabular data; and, whenever it encounters it, converts the data into a Word table.
Unlike Excel, Word VBA does not contain a function for transposing tabular data; so, in this tutorial, we remedy this by creating macro which will transpose the rows and columns of the currently selected table.
In this tutorial, we improve the VBA code generated by the macro recorder which allows the user to user to sort data by clicking on column headings.
When a content control is created, Word automatically displays default text which cannot be modified in the user interface. In this tutorial, we discuss the VBA code for programmatically modifying this placeholder text.
There are a number of scenarios in which you may need to create content controls programmatically. In this video, we'll look at one such scenario.
From the programming point of view, the main benefit of working with content controls is that you can write code which executes as the user interacts with the control. This is done by creating event procedures; and that's what we'll be looking at in this video.
We learned how to create text controls earlier in this section. In this video, we move onto the creation of combo boxes and drop-down lists.
In this final video on programming Word content control, we will discuss the picture control and write VBA code which updates the picture when the chooses an option from a drop-down menu.
In this video we look at the most basic way of distributing your VBA macros, which is to distribute the raw code; and then to provide instructions to the other party, as to how they should deploy the code.
In this tutorial, we move onto look at a slightly more sophisticated way of distributing code, which is to distribute a complete VBA module.
In this video, we'll look at what is, perhaps, the most professional method of distributing and deploying your VBA code; which is to use a Word add-in or global template.
In the first video of this section provides an overview of the techniques involved in referencing another Office application from within a Word macro.
In this tutorial, we will create a VBA solution which uses both Microsoft Word and Microsoft Excel to create the final output.
In this video, we will discuss the VBA code for controlling Microsoft Outlook from within a Word macro and sending out a series of email messages.
In our final project, we will create macro which generates a PowerPoint presentation based on the contents of a Word document.
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 Power BI, VBA, web development and Adobe Creative Suite automation.