Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Function autoReplaceStringPlaceholdersWithSymbolsLoop(stringText, charCode)
- ActiveDocument.Content.Find.ClearFormatting
- ActiveDocument.Content.Find.Replacement.ClearFormatting
- With ActiveDocument.Content.Find
- .Text = stringText
- .Replacement.Text = ChrW(charCode)
- .Forward = True
- .Wrap = wdFindContinue
- .Format = False
- .MatchCase = True
- .MatchWholeWord = False
- .MatchWildcards = False
- .MatchSoundsLike = False
- .MatchAllWordForms = False
- .Execute Replace:=wdReplaceAll
- End With
- autoReplaceStringPlaceholdersWithSymbolsLoop = 0
- End Function
- Sub autoReplaceStringPlaceholdersWithSymbols()
- '
- ' autoReplaceStringPlaceholdersWithSymbols Macro
- '
- '
- Dim textSymbolPairList As Variant
- Dim someNumber As Integer
- textSymbolPairList = Array(Array("tOP", 8868), Array("bOT", 8869), Array("nOT", 172), Array("aND", 8743), Array("oR", 8744), Array("rIMPLIES", 8658), Array("lIMPLIES", 8656), Array("uNEQUALS", 8800), Array("mULT", 215), Array("inputCHECK", 8730), Array("fnLB", 9001), Array("fnRB", 9002), Array("pOW", 9889), Array("bSIZE", 572), Array("strLEN", 10231), Array("dOM", 916), Array("mapTO", 10230), Array("sELEM", 8712), Array("sUBSET", 8838), Array("sUNION", 8746), Array("sINTERSECT", 8745), Array("fALL", 8704), Array("tEXISTS", 8707), Array("sUM", 8721), Array("pROD", 8719), Array("sOL", 167), Array("strMODL", 9665), Array("strMODR", 9655), Array("iNF", 8734), Array("sTATE", 963), Array("squigglyARROW", 8669), Array("tHEREFORE", 8756), Array("uNLIST", 9838), Array("bINTERSECT", 8216), Array("rDOT", 8901), Array("-|>", 8603), Array("->", 8594), Array("<|-", 8602), Array("<-", 8592), Array("<=", 8804), Array(">=", 8805), Array("<", 60), Array(">", 62), Array("mUNION", 1608), Array("wCOMP", 611))
- For Each textSymbolPair In textSymbolPairList
- someNumber = autoReplaceStringPlaceholdersWithSymbolsLoop(textSymbolPair(0), textSymbolPair(1))
- Next
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment