How to use VBA to repurpose a built-in command in Word and Excel

You can automate specific tasks by repurposing Word’s built-in commands. It requires a bit of VBA, but it’s super easy. Here’s how.

Image: PixelMe/Shutterstock

The article, How to use VBA to update fields in a Word document shows you three ways to update fields: printing the article and two VBA procedures. The two VBA procedures work well together, but you must close or open the document to trigger the procedures. In that article, I promised to show you a way to repurpose built-in commands to update the fields. In this article, I’ll show you how to repurpose the Save command to update all fields in the document. That’s a very specific task, but you can repurpose most any built-in command in the same way. We’ll be using Word in the examples, but you can also apply the same code to an Excel file.

SEE: 83 Excel tips every user should…

Keep reading the full content on the TechRepublic site.


Get Free Email Updates!

Signup now and receive an email once I publish new content.

I agree to have my personal information transfered to ConvertKit ( more information )

I will never give away, trade or sell your email address. You can unsubscribe at any time.

Leave a Comment