Almost any file you receive via e-mail could potentially have a virus attached to it. It may be sent maliciously from someone who is trying to get past your computer's security, or it may be from someone who has no idea that his computer is infected and unwittingly passes the virus on. There is no way to eliminate the risks associated with opening e-mail attachments, but there are ways of limiting them. Fortunately, most of them are easy and require little more than what should be on your computer already.
Assume the worst. If you receive an e-mail attachment from someone you don't know and that you have no reason to be in contact with, do not open it. If you are uncertain, attempt to get in contact with the sender to make sure the attachment is safe. If she doesn't answer, or the answer isn't satisfactory, don't open it.
Do not open an e-mail attachment on a computer that does not have an antivirus program installed. Most security programs on the market will protect against most viruses sent via e-mail. An ideal antivirus program will automatically update to protect the user against new threats.
Do not open any executable file you receive via e-mail if at all avoidable. Many e-mail providers will not even allow users to send or receive executable files, but this is not universal. Malicious software is much more likely to be found in an executable file than any other type.
Scan any file with an antivirus program before opening. While executable files are more dangerous than other types of files, even a Microsoft Word document can have viruses attached to it. Do not open any file that hasn't been scanned first, even if it's passed through your e-mail provider's security software with no flags raised.
These steps will reduce the risk of opening attachments, but the risks still exist. Make sure to back up any important work frequently, in the event of a software problem.