Sub Wozdl()
' Makro autorstwa Dawida Wiktorskiego (Fantazmaty)
Dim vFindText As Variant Dim vReplText As vjariant Dim sFindText As String Dim sReplText As String Dim i As Long
n r? r? n 9 n nr r r r - r r -
nn nin nn n r? \ r r r t
vFindText = Array(" "- ",
vReplText = Array(" ",
r non n | n r? r? r? _ r? r? _ r? r? _ n n _ r? r? i r? non ni i r? r r r • r • r • r • r • r - - r r - - i
r? 9 n n i n n n r? _ r? n _ r? r? _ n r? _ r? r? | n r? 9 n n 1 n r? 9 n
nAfn nr? r? r? r? a- rv n a- r? rv a-_ r?
- - r r r & r P r r
nr? nnnn rt^^n rt^^n ha-h rt^—r? n 1 n
,AnAnw n 1 n non n 9 •? nn nn nn
n nA_n ni i r s r
For i = L3ound(vFindText) To UBound(vFindText) sFindText = vFindText(i) sReplText = vReplText(i)
With Selection.Find .Forward = True .Wrap = wdFindContinue .MatchWholeWord = True .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False .Format = True .MatchCase = False .Text = sFindText .Replacement.Text = sReplText .Execute Replace:=wdReplaceAll End With Next i Word2 End Sub
Sub Word2()
Dim vFindText As Variant Dim vReplText As Variant Dim sFindText As String Dim sReplText As String Dim i As Long
vFindText = Array (" P32~s] {2; >", " (A13) (^32) (*) ", " ([\,\;\:\?\...]) ([A-z] vReplText = Array(" ", "\1\3", "\1 \2", "\1 -", "\1 -", "\1 -", "\1 -",
", "([ąęśńółćżź]) (-)", "([ąęśńółćżź]) (-) ", "- \2", "- \2", "\1 -", "\1 -", "- \2", "-
"(-)([A-z])", "(-)
([A-z])",
"([A-z]
(-)
", "([A-z])i
For i = L3ound(vFindText) To UBound(vFindText) sFindText = vFindText(i) sReplText = vReplText(i)
With Selection.Find .Forward = True .Wrap = wdFindContinue .MatchWholeWord = True