Sandbox

Revision as of 22:03, 20 January 2020 by Amwelladmin (talk | contribs)
Sub Wikifier
   With Selection.Find
       .Text = "{{{article}}}"
       .Replacement.Text = "{{{{{template}}}|{{{article}}}}}"
       .Forward = True
       .Wrap = wdFindContinue
       .Format = False
       .MatchCase = True
       .MatchWholeWord = False
       .MatchWildcards = False
       .MatchSoundsLike = False
       .MatchAllWordForms = False
   End With
   Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub Wikifier definition 
 Selection.Find.ClearFormatting
   Selection.Find.Replacement.ClearFormatting
   With Selection.Find
       .Text = ChrW(8220) & "([a-z,A-Z,0-9, ]{1,})" & ChrW(8221)
       .Replacement.Text = ChrW(8220) & "'''{{nycsaprov|\1}}'''" & ChrW(8221 _
           )
       .Forward = True
       .Wrap = wdFindAsk
       .Format = False
       .MatchCase = False
       .MatchWholeWord = False
       .MatchAllWordForms = False
       .MatchSoundsLike = False
       .MatchWildcards = True
   End With
   Selection.Find.Execute Replace:=wdReplaceAll
End Sub