It's an m-file. In Windows to capture the current window, such as an editor window containing your attached m-file, to the clipboard, type alt-PrintScreen. It's then in the clipboard and then you can paste it and save it in Photoshop or some other photo/paint program.
If your m-file creates a figure, then you can save the figure to a file with export_fig() http://www.mathworks.com/matlabcentral/fileexchange/23629-export-fig