A tube of sleeve material made of thermoplastic film is drawn over a shaping piece, for example a format tube (2) of a tubular bag machine. At the edges of the shaping piece (2) heating wires (13) which heat and thereby plasticate the film are disposed. After cooling of the film the tube of sleeve material has stable edges so that even an empty packaging bag made of relatively thin film is stable. The device is advantageous in particular in packaging systems in which the production of the bag takes place separately from its filling. <IMAGE>