Process for preparing compounds of the formula by reacting a compound of the formula with a compound of the formula with X = -OH or -NR'R"; and R' = H or a protecting group function, preferably selected from the group comprising tert -butyloxycarbonyl, methyloxycarbonyl, benzyloxycarbonyl, phenyloxycarbonyl, acetyl, trifluoroacetyl, benzoyl, sulphonyl and sulphenyl; and R" = H or a protecting group function, preferably selected from the group comprising tert -butyloxycarbonyl, methyloxycarbonyl, benzyloxycarbonyl, phenyloxycarbonyl, acetyl, trifluoroacetyl, benzoyl, sulphonyl and sulphenyl; or R' and R" may together form covalently bonded protecting group radicals, preferably radicals of the formula PGa or PGb and R 1, R 2, R 3, R 4, R 6 and R 8 are each independently selected from the group comprising hydrogen, (C 1 -C 12)-alkyl, -O-(C 1 -C 12)-alkyl, -N[(C 1 -C 12)-alkyl] 2, -NH(C 1 -C 12)-alkyl, (C 6 -C 20)-aryl, O-(C 6 -C 20)-aryl and halogen, preferably consisting of hydrogen, (C 1 -C 12)-alkyl, -O-(C 1 -C 12)-alkyl, -N[(C 1 -C 12)-alkyl] 2 and halogen, more preferably consisting of hydrogen, (C 1 -C 12)-alkyl and -O-(C 1 -C 12)-alkyl; and R 5 and R 7 are each independently selected from the group comprising (C 1 -C 12)-alkyl, -O-(C 1 -C 12)-alkyl, -N[(C 1 -C 12)-alkyl] 2, -NH(C 1 -C 12)-alkyl, (C 6 -C 20)-aryl, -0- (C 6 -C 20)-aryl, halogen, preferably consisting of (C 1 -C 12)-alkyl, -O-(C 1 -C 12)-alkyl, -N[(C 1 -C 12)-alkyl] 2 and halogen, and more preferably consisting of (C 1 -C 12)-alkyl, -O-(C 1 -C 12)-alkyl and -N[(C 1 -C 12)-alkyl] 2; where adjacent radicals from the group of the R 1 to R 8 radicals may be joined via a covalent bond, characterized in that the reaction is conducted electrochemically. with X = -OH or -NR'R"; and R' = H or a protecting group function, preferably selected from the group comprising tert -butyloxycarbonyl, methyloxycarbonyl, benzyloxycarbonyl, phenyloxycarbonyl, acetyl, trifluoroacetyl, benzoyl, sulphonyl and sulphenyl; and R" = H or a protecting group function, preferably selected from the group comprising tert -butyloxycarbonyl, methyloxycarbonyl, benzyloxycarbonyl, phenyloxycarbonyl, acetyl, trifluoroacetyl, benzoyl, sulphonyl and sulphenyl; or R' and R" may together form covalently bonded protecting group radicals, preferably radicals of the formula PGa or PGb and R 1, R 2, R 3, R 4, R 6 and R 8 are each independently selected from the group comprising hydrogen, (C 1 -C 12)-alkyl, -O-(C 1 -C 12)-alkyl, -N[(C 1 -C 12)-alkyl] 2, -NH(C 1 -C 12)-alkyl, (C 6 -C 20)-aryl, O-(C 6 -C 20)-aryl and halogen, preferably consisting of hydrogen, (C 1 -C 12)-alkyl, -O-(C 1 -C 12)-alkyl, -N[(C 1 -C 12)-alkyl] 2 and halogen, more preferably consisting of hydrogen, (C 1 -C 12)-alkyl and -O-(C 1 -C 12)-alkyl; and R 5 and R 7 are each independently selected from the group comprising (C 1 -C 12)-alkyl, -O-(C 1 -C 12)-alkyl, -N[(C 1 -C 12)-alkyl] 2, -NH(C 1 -C 12)-alkyl, (C 6 -C 20)-aryl, -0- (C 6 -C 20)-aryl, halogen, preferably consisting of (C 1 -C 12)-alkyl, -O-(C 1 -C 12)-alkyl, -N[(C 1 -C 12)-alkyl] 2 and halogen, and more preferably consisting of (C 1 -C 12)-alkyl, -O-(C 1 -C 12)-alkyl and -N[(C 1 -C 12)-alkyl] 2; where adjacent radicals from the group of the R 1 to R 8 radicals may be joined via a covalent bond, characterized in that the reaction is conducted electrochemically.