Sub
Callback(control
As
IRibbonControl)
Dim
Wort
As
Range
Dim
s
As
Long
Dim
NeuerText
As
String
For
Each
Wort
In
ActiveDocument.Words
For
s = 1
To
Len(Wort)
If
Asc(Mid(Wort, s, 1)) >= 65
And
Asc(Mid(Wort, s, 1)) <= 90
Then
If
Asc(Mid(Wort, s, 1)) <= 77
Then
NeuerText = NeuerText & Chr(Asc(Mid(Wort, s, 1)) + 13)
Else
NeuerText = NeuerText & Chr(Asc(Mid(Wort, s, 1)) - 13)
End
If
ElseIf
Asc(Mid(Wort, s, 1)) >= 97
And
Asc(Mid(Wort, s, 1)) <= 122
Then
If
Asc(Mid(Wort, s, 1)) <= 109
Then
NeuerText = NeuerText & Chr(Asc(Mid(Wort, s, 1)) + 13)
Else
NeuerText = NeuerText & Chr(Asc(Mid(Wort, s, 1)) - 13)
End
If
Else
NeuerText = NeuerText & Mid(Wort, s, 1)
End
If
Next
Wort =
""
Next
Selection.TypeText (NeuerText)
End
Sub