Forum Discussion
MeganMaverick
Oct 13, 2023Copper Contributor
Macro or style for not line-splitting double dashes?
I follow a style guide that requires double dashes (--) to be on one line and not split across two. Is there any way to automate searching for and correcting this issue? Relatively new to automating ...
editingbyrita
Sep 30, 2024Copper Contributor
MeganMaverick Hi Megan,
It's probably too late but I recently set up a macro to do this. I am also in transcription. In find/replace, use Find: "-^l-" without quotes (that's a lowercase L); Replace: "--" without quotes. This should fix it. This is basically what I programmed my macro to look for and then replace.
If you know how to make a macro or are willing to google how, use the following coding:
Sub Dash()
'
' Dash Macro
'
'
With Selection.Find
.Text = "-^l-"
.Replacement.Text = "--"
.Forward = True
.Wrap = wdFindAsk
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub