Geoff-Hart.com: Editing, Writing, and Translation

Home Services Books Articles Resources Fiction Contact me Français

You are here: Books --> Effective Onscreen Editing 4th edition --> Word 2016 Chapter 10: Automating Your Edits

Vous êtes ici : Livres --> Effective Onscreen Editing 4th edition --> Word 2016 Chapter 10: Automating Your Edits

Chapter 10: Automating Your Edits

I have always wished that my computer would be as easy to use as my telephone. My wish has come true. I no longer know how to use my telephone.”—Bjarne Stroustrup (originator of the C++ programming language)

The probability that a given program will conform to expectations is inversely proportional to the programmer’s confidence in his ability to do the job. When a programmer tells you ‘no problem’, you have a serious problem. No system is ever completely debugged. Attempts to debug it invariably introduce new bugs which are even harder to find.”—Brasington’s laws of programming

Software and reference links for all versions of Word

This Web page contains instructions on the following subjects:

Alternatives to Word's automatic text

Automatic text

Macro for cleanup of a document

Macro for changing author name for a blind review

Macro for copying selected text into the Find dialog box

Print a list of your automatic text entries

Recording a macro

Running a macro

Templates and Add-ins dialog box

Alternatives to Word's automatic text

If you don't want to use Word's automatic text features, or want to add a similar feature to other programs that lack this feature, the MacWorld article Enable Text Substitutions in Every App provides instructions on how to do this.

Automatic text

To access Word's "automatic text" features, select the text that you want to convert into automatic text, then open the "Tools" menu and select "AutoCorrect":

The AutoCorrect menu choice

In the AutoCorrect dialog box, select the type of automatic text you want to work with. For short text, choose "AutoCorrect":

The AutoCorrect Options dialog box

Although you can edit the text within this dialog box, this dialog box makes it hard to see what you're doing. You'll find it's easier to recreate or edit the automatic text by typing it in a document window if it's long or complicated. Then select the text and open the "AutoCorrect" dialog box. Type the old shortcut if you want to replace the old version of this text with the new version, then click the "Replace" button.

To create a longer and more complicated automatic text entry called "AutoText", select the "AutoText" tab in this dialog box:

The AutoText dialog box

When Word believes that you might be typing an AutoText entry, it displays a popup hint with the proposed replacement text. If it has guessed right, simply press Enter to insert that text:

The AutoText hint balloon

Macro for cleanup of a document

Sub Cleanup()

' Cleanup Macro

' Recorded 8/7/05 by Geoff '

Selection.Find.ClearFormatting

Selection.Find.Replacement.ClearFormatting

With Selection.Find .Text = "^p^p"

.Replacement.Text = "^p"

.Forward = True

.Wrap = wdFind Continue

.Format = False

.MatchCase = False

.MatchWholeWord = False

.MatchWildcards = False

.MatchSoundsLike = False

.MatchAllWordForms = False

End With

Selection.Find.Execute Replace:=wdReplaceAll

End Sub

Macro for changing author name for a blind review

To change to a "blind review" identity:

Sub Blind()

Application.UserName = "Journal Reviewer"

Application.UserInitials = "JR"

End Sub

To restore your original identity:

Sub Geoff()

Application.UserName = "Geoff Hart"

Application.UserInitials = "GHT"

End Sub

Macro for copying selected text into the Find dialog box

Sub FindSelectedText()

' FindSelectedText Macro

Selection.Copy

' Define selection as variable

Dim MyFoundText$

MyFoundText$ = Selection

Selection.Find.ClearFormatting

With Selection.Find

.Text = MyFoundText$

.Replacement.Text =""

.Forward = True

.Wrap = wdFindAsk

.Format = False

.MatchCase = False

.MatchWholeWord = False

.MatchWildcards = False

.MatchSoundsLike = False

.MatchAllWordForms = False

End With

Selection.Find.Execute

End Sub

Print a list of your automatic text entries

To print a list of your automatic text entries, press Command+P to display the "Print" dialog box. Open the menu that initially displays “Copies & Pages”:

The "print what" menu in Word's Print dialog box

Open that menu and select “Microsoft Word”:

Selecting Microsoft Word options from the Print dialog box

Open the “Print What” menu:

The "print what" menu in the Print dialog box

From the menu, select “AutoText entries”:

Choosing AutoText entries from the "print what" menu

Note that this list is quite long, so consider printing it as a PDF file. This has an additional advantage: you can subsequently copy and paste the text if you need to recreate a lost or deleted automatic text entry.

Recording a macro

To start recording a macro, open the "Tools" menu, select "Macro", then select "Record macro":

Recording a macro from the Tools menu

Alternatively, choose the Ribbon's "View" tab, open the menu by the "Macros" icon, and choose "Record Macro":

Recording a macro from the Ribbon

In the "Record Macro" dialog box, name the macro, decide whether to bind it to a keyboard shorcut, and choose where you want to store it:

The "record macro" dialog box

If you click the “Keyboard” button, Word displays the "Customize Keyboard" dialog box (see Chapter 3 for details) so you can assign a new keyboard shortcut.

To record the macro, perform the series of commands that you want to record. While you are still recording, Word changes the cursor shape to remind you:

The "record macro" cursor

If you need to pause the recording, select the Ribbon's "View" tab and open the menu for the "Macros" icon. Choose "Pause recording":

Pausing the recording of a macro

To resume recording after the pause, open the same menu and select "Resume Recorder":

Resuming a paused recording

When you have finished performing the steps in the macro, open the same menu and select ""Stop recording":

Stop recording a macro

Running a macro

There are three ways to run a macro. First, if you stored it in the Quick Access Toolbar, you can display that toolbar and then click the icon. Second, if you defined a keyboard shortcut, you can type the keyboard shortcut. Third, you can select it from the list of available macros. To do so, open the "Tools" menu, select "Macro", and then select "Macros":

Choosing Macros from the Tools menu

Alternatively, select the Ribbon's "View" menu, open the menu beside the "Macros" icon, then select "View Macros":

Viewing macros from the Ribbon

Select the desired macro in the "Macros" dialog box and click the “Run” button:

Running a macro from the Macros dialog box

Templates and Add-ins dialog box

To gain access to the features provided by the "Templates and Add-ins" dialog box, open the "Tools" menu and select "Templates and Add-ins":

Opening the Templates dialog box from the Tools menu

In the "Templates and Add-ins" dialog box, you can manage templates and access the Organizer:

The Templates and Add-ins dialog box

Use the "Organizer" to transfer various useful things (styles, autotext, toolbars, and macros) between documents:

The Organizer dialog box


©2004–2024 Geoffrey Hart. All rights reserved.