Although it seems like a very basic function, you cannot accomplish this task on the iPhone. You cannot alter the documents you receive as email attachments. There are ways to download txt files off the Internet and then edit them though, using an app like iStorage. You cannot DL doc files and edit them though.