@pken,
That sounds like a good way to burn your barn down. A similar but safer (and likely cheaper) solution would be to wire an outlet (using an approved electrical box that you can get at your local hardware store for a few dollars) and then just plug it into that outlet. Rather than destroy an extension cord, buy some household wire (cheaper) for your wiring project. You could probably connect into an existing junction box at an outlet if you have access to that. Be sure to turn the power off before connecting up.
It is not hard or expensive to do this the right way. Please don't take a shortcut and end up with a very serious situation on your hands.