Join Gini von Courter for an in-depth discussion in this video Create a macro in the Visual Basic Editor, part of Word: Automating Your Work with Macros.
- [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 overused,…you might be going through a document to highlight…
- List the steps required to run the macros on a document you created when you open the document and see a SECURITY WARNING banner message.
- Explain how to run a macro.
- Identify where to save a building block if there is no logical gallery for it.
- Recall the best way to create an auto macro.
- Recognize why you would create a macro in the Visual Basic Editor rather than using the Macro Recorder.
- Identify what you can add any existing macro to.