A3Writer: Writing Tools: Macros--replace periods
1001 Nights (3) Abraham (11) Aphrodite (3) Apocalypse (6) Apollo (4) Arabian (3) Artemis (5) Athena (3) Bard (1) Ben Slater (13) Bible (33) Celtic (2) Character File (2) Chinese (1) Christian (1) Conferences (29) creation myths (15) Criminalelement (11) Dark Winds (22) Demeter (10) Don Iverson (4) Eden (5) Enchanter (16) essay (9) F3 (344) Fairy Tales (14) Family (2) Flood Myth (8) Flynn (66) Greek (43) Guest (1) Hades (10) Hindu (2) History Prof (22) Holiday (12) Holiday Myths (6) Incan (1) Iranian (2) Japanese (1) Job (21) Knowledge Myths (3) Library (8) Life (121) Love Gods (4) M3 (137) map (13) Matt Allen (100) Metamyth (5) Misc Flash (36) monthly chart (21) Movies (6) Myth Law (2) Myth Media (4) NaNoWriMo (20) Noah (5) noir (9) Norse (10) Odyssey (7) Persephone (13) Persian (1) Poseidon (1) Prometheus (5) publishing (24) ramble (111) Review (1) Sam Faraday (22) Sci Fi (15) science (1) Serial (17) short story (14) Spotlight (8) Storm Riders (45) Teaching (136) Tech (18) Transformation (5) Travel (27) TV (10) TV Myth (1) Underworld (6) Vacation (15) vampires (18) W3 (11) Writing (166) Writing Tools (15) Zeus (7)

Wednesday, April 27, 2011

Writing Tools: Macros--replace periods

     One of the pet peeves of copyeditors is the dreaded double space after a period, or other sentence ending punctuation. And for authors preparing a manuscript, it becomes tedious to find and replace all these instances, even using the word processors feature. So here is a quick little macro for Word that does just that. Assign the macro to a button, and when it's time for the tediousness, simply click it.
     This macro can also be modified to accommodate exclamation points and question marks by replacing the period in the find and replace lines, then the whole thing could be run at once to replace all the spaces after end punctuation.

Here's the macro in its entirety:

Sub periodspace()
'
' periodspace Macro
'
'
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = ". "
.Replacement.Text = ". "
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub

No comments: