Created
September 12, 2019 07:06
-
-
Save palikhov/88222fc8f668fb56a72f31baf47fc2d8 to your computer and use it in GitHub Desktop.
Macro to clear invisible symbols before bbacode
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub ClearingNonVisibleSymbols() | |
' | |
Selection.Find.ClearFormatting | |
Selection.Find.Replacement.ClearFormatting | |
With Selection.Find | |
.Text = "^p^p" | |
.Replacement.Text = "^p" | |
.Forward = True | |
.Wrap = wdFindContinue | |
.Format = False | |
.MatchCase = False | |
.MatchWholeWord = False | |
.MatchWildcards = False | |
.MatchSoundsLike = False | |
.MatchAllWordForms = False | |
End With | |
Selection.Find.Execute Replace:=wdReplaceAll | |
Selection.Find.Execute Replace:=wdReplaceAll | |
Selection.Find.Execute Replace:=wdReplaceAll | |
With Selection.Find | |
.Text = "^t" | |
.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 | |
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 | |
With Selection.Find | |
.Text = "^p " | |
.Replacement.Text = "^p" | |
.Forward = True | |
.Wrap = wdFindContinue | |
.Format = False | |
.MatchCase = False | |
.MatchWholeWord = False | |
.MatchWildcards = False | |
.MatchSoundsLike = False | |
.MatchAllWordForms = False | |
End With | |
Selection.Find.Execute Replace:=wdReplaceAll | |
Selection.Find.Execute Replace:=wdReplaceAll | |
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