Created
February 16, 2018 18:51
-
-
Save darkxanter/dafe43e1041bd571761e8841a22885f9 to your computer and use it in GitHub Desktop.
This file contains 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 RefNoText() | |
'Подавить постоянную часть перекрестной и оставить | |
'только номер вставкой ключа числового формата в поле Ref | |
With Selection | |
.Fields.ToggleShowCodes | |
.Find.ClearFormatting | |
.Find.Replacement.ClearFormatting | |
With Selection.Find | |
.Text = "_Ref^#^#^#^#^#^#^#^#^#" | |
.Replacement.Text = "^& \# 0" | |
.Forward = True | |
.Wrap = wdFindStop | |
.Format = False | |
.MatchCase = False | |
.MatchWholeWord = False | |
.MatchWildcards = False | |
.MatchSoundsLike = False | |
.MatchAllWordForms = False | |
End With | |
.Find.Execute Replace:=wdReplaceAll | |
.Fields.Update | |
End With | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment