How to Run Useful Macros in Word
A Macro is a simple Visual Basic Code that Word "runs" on your document, performing specialized automated tasks. It's easy to implement and can save you a lot of time. The instructions that follow work for Word 2007
Open your document and enable the "Developer" tab on the ribbon
By default, the developer tab won't appear in Word. To enable it, click on the "Office" button, then on Word Options.
Check the box next to "Show Developer tab in the Ribbon," then click OK.
Open the Visual Basic Editor
Press ALT+F11 on your keyboard to open the Visual Basic Editor. This program looks complicated, but we are only going to scratch the surface of it, so don't fret.
Insert a New Module
Click on "Insert" and then "Module," and a blank window will appear. The Module is a text box that acts as the parameters for the small program that we will be running our document through. Paste the Macro code into this window. For a list of useful macros, scroll to the bottom of this lesson.
Run the Macro
Lastly, click the "Play" button on the menu bar or press the F5 key on your keyboard to run the script on your document. And you're done! You can close the Visual Basic editor if you don't' want to run any more scripts/macros.
Useful Macros - Select all Tables within your document
Dim mytable As Table
Application.ScreenUpdating = False
For Each mytable In ActiveDocument.Tables
Application.ScreenUpdating = True
Useful Macros - Remove all Tables in your document, but keep the text
' AllTablestoText Macro
' Macro created by Jarosław Michalak
For Each aTable In ActiveDocument.Tables
aTable.ConvertToText wdSeparateByCommas, True
Useful Macros - Delete all small images from your transcript
Dim iShp As InlineShape
For Each iShp In ActiveDocument.InlineShapes
If .Width < CentimetersToPoints(5) Then
Useful Macros - Widen all Tables in your document to the page margins
Dim oTable As Table
For Each oTable In ActiveDocument.Tables
.PreferredWidthType = wdPreferredWidthPercent
.PreferredWidth = 100