Easy question

F

filo666

1) How to tell word: for each character in the sheet change it to the next
character.
EX. apple chages to: bqqmf

2) if the character is A or B or C or D change it to "Ã…", goto next character

TIA
 
J

Jean-Guy Marcil

filo666 was telling us:
filo666 nous racontait que :
1) How to tell word: for each character in the sheet change it to the
next character.
EX. apple chages to: bqqmf

2) if the character is A or B or C or D change it to "Å", goto next
character

TIA

Try this:

Application.ScreenUpdating = False

Dim i As Long

With ActiveDocument.Characters
For i = 1 To .Count
If Asc(.Item(i).Text) = 122 Then
.Item(i).Text = Chr(97)
ElseIf Asc(.Item(i).Text) > 96 And Asc(.Item(i).Text) < 122 Then
.Item(i).Text = Chr(Asc(.Item(i).Text) + 1)
ElseIf Asc(.Item(i).Text) > 64 And Asc(.Item(i).Text) < 69 Then
.Item(i).Text = Chr(197)
End If
Next
End With

Application.ScreenRefresh
Application.ScreenUpdating = True

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top