Hello again. My problem is now solved. When debugging it I stumbled to change my code a bit. However, I don’t understand why it works now. If I return to my original message and do the following changes in code, it works:
1. On line 34 I change to “searchfor:='ñ';”
2. On line 37 I replace “copy(word,i,1)” with “copy(word,i,2)”
Why with the normal characters it is sufficient to use “copy(word,i,1)” but with the Spanish special characters “copy(word,i,2)”? Has someone of you any idea of this?