Abstract: In order to apply an optical element such as a lens, for example, to an optoelectronic component, the surface (3B), averted from the transmitter or receiver (2), of the filling material (3) is designed directly with a lens profile (7). This is done by filling a defined quantity of the transparent filling material (3) into the recess (1A) of the carrier body (1) for the purpose of embedding the transmitter or receiver (2), and by subsequently impressing a lens profile (7) onto the surface (3B), averted from the transmitter or receiver, of the transparent filling material (3) by means of a punch (8), before the transparent filling material with the lens profile (7) thus impressed is completely cured.