This is the simple complement to GetMode.edt, which comes with WinEdt. I.e. it inserts something like
% -*- TeX -*-
in the first line of your file. It will put a comment character in front, if one is defined for the respective mode (in Options | Settings | Comments).
Put the Macro in %b\Macros\. If you want you can assign a menu entry for it, probably next to GetMode.
Macro contributed by Robert <w.m.lgmx.net>,