Skip to content

Instantly share code, notes, and snippets.

@stevecooperorg
Created October 30, 2014 21:37
Show Gist options
  • Save stevecooperorg/b6ec8c623a85e74cf301 to your computer and use it in GitHub Desktop.
Save stevecooperorg/b6ec8c623a85e74cf301 to your computer and use it in GitHub Desktop.
ReplaceTabsWithParagraphs VBA macro
Sub ReplaceTabsWithParagraphs()
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "^t"
.Replacement.Text = "^v"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchByte = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
.MatchFuzzy = False
End With
While Selection.Find.Execute
Selection.TypeParagraph
Wend
Rem Replace:=wdReplaceAll
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment