When a document is closed without saving it to the hard drive, its contents are usually lost. However, Microsoft Word, Pages and other word processors may save documents in temporary files while these documents are being created and edited. It may be possible to restore these documents and open them in Pages.
Open Pages, Microsoft Word or other word processors that have been used recently to edit the documents you wish to recover. Most word processors have an auto-recover mode that will bring back the contents of the document you lost if they have been saved on disk. If this is the case, a new untitled document will be created with the contents of your file. Save it to your hard drive immediately.
Switch to the Finder application and choose "Find" from the File menu. Click on "This Mac" in the Search bar, then select "Kind" is "Document." Choose "As list" from the View menu. Then choose "Arrange by last modified" from the View menu. This will show you all of the documents that have been saved to your hard drive in newest-to-oldest order. Scroll down in the window and review these file names to see if there are any documents with names including "temporary" or "untitled," and with kinds that are word processing documents or plain text files. There will be many documents here, so use the date and time on each file to help narrow your search.
Drag these documents to the Pages icon in your Dock. They will open in Pages if they are saved word processing documents, and you may be able to retrieve the text of your lost document from these files. If a file cannot be opened in Pages, try dragging it to the TextEdit icon in your Dock instead.