When I want to view a doc attachment in Gmail, I am automatically sent to my Google Docs to view it. How to stop that and use a default viewer (Word, Foxit, etc.)?
To view the file on a desktop application you'll need to download the file first. At present there is no way to set the action of the View button within Gmail.
The closest thing to what you are describing (assuming you are using Google Chrome) would be to download the file, then right click on the downloads progress and select Always open this file type. Then whenever you click download on a