Skip to content

Instantly share code, notes, and snippets.

@palikhov
Created September 12, 2019 07:07
Show Gist options
  • Save palikhov/e2d016eeffd277c9c761eb22776fbe40 to your computer and use it in GitHub Desktop.
Save palikhov/e2d016eeffd277c9c761eb22776fbe40 to your computer and use it in GitHub Desktop.
Macro to replace ^p with ^p^p
Sub ReplacePwith2P()
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "^p"
.Replacement.Text = "^p^p"
.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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment