how to convert ANSI or unicode into text

when I open my document it is in code and need to convert it back to text

Do you mean that an ASCII Filter dialog box appears when you try to open the document? Please provide a little more detail - type of file, how you open the document and exactly what happens when you open it.