From the course: Word: Automating Your Work with Macros
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Create a macro in the Visual Basic Editor - Microsoft Word Tutorial
From the course: Word: Automating Your Work with Macros
Create a macro in the Visual Basic Editor
- [Instructor] We've used the macro recorder to create every macro we've created so far. There's another way you can create macros and that's using the Visual Basic editor. You can either begin by typing text using the editor itself, or you can copy and paste macros that you might find in online guides or elsewhere. The reason that I would create a macro in the editor rather than recording it is I need to do something that can't be recorded. Let me show you the closest version of what I could record and that is with highlighting turned on I would like to highlight the term smartart every time it appears in the document. I'm going to Replace All and notice, there are two of them, and they are both bright green. And that's just fine. And I'm going to undo that. However, I'd like to look for more than one term. I have a whole list of terms that I want to look for and the business uses for this are legion. For example, you might be going through a document to find cliches that are…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.