Hi, JJ
Use the Teach feature, It Saves it to C:\Mach3\Gcode, You will have to Edit it anyway to add the M99, Use the File, "Save As" and Save it to the C:\Mach3\SubRoutines\, Folder.
On the Edit Problem, Try this "C:\WINDOWS\notepad.exe", Works Hear for Me.
Hope this Helps, Chip