
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.
In this video, we look at using Application.FontNames and Range.Find objects in conjunction to find out which fonts are used in the active document.
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.
We end this chapter on sections, headers and footers by looking at the VBA code for inserting an image into a header.
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.
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:
You will learn how to program the Application object, which represents Word itself; how to check the user's location and screen resolution; and how to check which fonts are used in a particular document.
Moving onto files and documents, you will learn how to process all files in a given Folder; how to archive files older than a certain date; and how to test whether a given Document is currently open.
Next, when we turn our attention to the Range and Selection objects, you will learn the similarities and differences between these two objects; and when to use one in preference to the other. You'll learn the important Word programming skills of verifying the type of object which is currently selected and checking the page location of the selection.
In the chapter on Word text objects, you will learn the VBA syntax for processing paragraphs, sentences, words, characters and ranges. You will gain confidence in how to have your macros perform operations like inserting text and copying text without wiping the user's clipboard.
This is also the section in which you will learn how to program the Range.Find object to find and replace both text and formatting attributes; how to change the Case of Text, how to create bulleted and numbered lists; how to use the Word VBA objects used which control the formatting of text; how to create style; and how to create tables of contents.
Once we’ve covered the nuts and bolts of working with text, we'll examine the code which you need when working with longer, more complex documents. In this section, you will learn how to create sections, headers and footers; how to work with odd and even headers and footers; how to use the LinkToPrevious Property; inserting Page Numbers; insert an image into a Header; and how to program the PageSetup Object.
Then we'll turn our attention to creating and manipulating tables with VBA code; performing such operations as merging cells, formatting tables, converting text to a table, we'll create a macro which will transpose the rows and columns of the currently selected table.
The course also covers content controls and interactive forms. You will learn how to combine this powerful feature with VBA programming; how to create content controls programmatically; and how to write code which responds to content control events.
Towards the end of the course, we'll discuss the different ways of distributing Your VBA macro solutions.
And, to end the course, we'll create a series of solutions which demonstrate how to write Word VBA code which controls not only the Word object model, but the object models of other Microsoft Office programs.
We'll create three inter-application solutions: the first combining Word and Excel workflows; the second Word and Outlook; and the third, Word and PowerPoint.
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.