Please Note: This article is written for users of the following Microsoft Word versions: 2007, 2010, 2013, 2016, 2019, and Word in Microsoft 365. If you are using an earlier version (Word 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Word, click here: Writing a Macro from Scratch.
Written by Allen Wyatt (last updated July 27, 2023)
This tip applies to Word 2007, 2010, 2013, 2016, 2019, and Word in Microsoft 365
Many of the tips used in WordTips rely upon macros in order to run. Some readers may not know how to enter a macro from scratch in Word. There are actually two ways you can create macros. First you can record a macro, which is appropriate when you want to record a series of steps you perform quite often. The second method of creating a macro, writing one from scratch, is much more powerful.
To create a macro from scratch, follow these steps:
Note:
WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (6821) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, and Word in Microsoft 365. You can find a version of this tip for the older menu interface of Word here: Writing a Macro from Scratch.
Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!
The Open dialog box is one that few of us think about, but you can control how it behaves with a little bit of macro ...
Discover MoreWhen text is added to your document by a macro, and that text includes quotes or apostrophes, Word won't change the ...
Discover MoreWhen working with documents in a macro, it makes sense that you may need to create a document from time to time. Here's ...
Discover MoreFREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
2020-03-31 08:25:34
Pia
Hello,
I have to write a macro to change the branding and the structure of a word document (method of procedure - MOP) based on the following requirements:
1. We have a MOP document written in our company's template. The client, however, wants the same document in their company's format. So, we need to rebrand the document per the client company's template.
2. We also need to make changes to the placement of content. For example, in our document, there is a section called "Pre-installation Checks". The content from this section needs to go into a table in the Client's document. So, it means we need to make structural changes to the document.
There would be more such structural changes throughout the document. I can work on those if you can provide an example for one such change.
The idea here is for the engineers who are not very familiar with Word to work on these documents with just a click of the macros.
Could you please help with writing a macro for these two requirements?
Thank you!
Got a version of Word that uses the ribbon interface (Word 2007 or later)? This site is for you! If you use an earlier version of Word, visit our WordTips site focusing on the menu interface.
Visit the WordTips channel on YouTube
FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2024 Sharon Parq Associates, Inc.
Comments