Thread: [Solved] Reversing text
View Single Post
 
Old 09-07-2014, 08:28 AM
Dimsok Dimsok is offline Windows XP Office 2007
Advanced Beginner
 
Join Date: Sep 2014
Location: exUSSR
Posts: 50
Dimsok is on a distinguished road
Default Reversing text

I have a script for reversing letters in words

Sub ReverseWords()
Dim i As Long
Dim OldString As Variant
Dim RevText As Variant
OldString = Split(Selection.Text, " ")
For i = 0 To UBound(OldString)
OldString(i) = StrReverse(OldString(i))
Next
RevText = Join(OldString, " ")
MsgBox RevText
End Sub

But the result just show in message window. Is that possible to change that code that reversed text replaced marked text?
Reply With Quote