This is one of the jobs I had carefully shoved aside, in the hope I would never have to get to do it. Eventually there was no way for me to keep ignoring the tailgate standing there all covered in dust… This is what I did to repair the rusted out window frame:

  1. Use thick paper to make models of the existing frame (or what's left of it), cereal boxes are excellent for this job; 
  2. Copy the paper models on 1 mm sheet metal;
  3. Cut the shapes out of the metal using a sheet metal cutter or a power jigsaw;
  4. Fold the sheet metal in an L-shape on a workbench;
  5. I used a spot welder to weld both L profiles together, alternatively you can drill holes in one profile and weld both profiles together by filling up the holes;
  6. There is some special shrinking equipment available to bend the profiles into the same shape as the window corners; most likely, you will find this tool in a panel beating workshop. Try cake or a six-pack of beer…
  7. Carefully mark the places where you are going to fit the new window frame pieces, the better you make it fit, the less time you will have to spent on the finishing.
  8. When the new pieces fit, use some spot welds to join the piece with the tailgate, keep checking if it all fits well;
  9. Keep adding welds in opposite sides and cool using air to prevent the metal from changing shape;
  10. Use a multi-layer disk to grind away the excessive welds, a 2 or 3 mm grinding disk will do the trick in the corners.