I'm posting this mostly for my own benifet since every time I need it I spend 20 minutes googling around to get the code snippet again.
So here's the acticle: LINK
Here's the Code:
So you can change the extensions to the following:
- IMAGE
- PDF
- RTF
- MHTML
- XLS
- CSV
- XPS
This comes from here: LINK