The methylation of 2'-O,N-bis(benzyloxycarbonyl)-N-demethylerythromycin A (I) with methyl iodide and KOH or NaHI in DMSO-dimethoxyethane gives the 6-O-methyl derivative (II), which is deprotected by hydrogenation with H2 over Pd/C in ethanol acetic acid affording 6-O-methyl-N-demethylerythromycin A (III). Finally, this compound is methylated with formaldehyde under reductive conditions (H2-Pd/C) in ethanol/acetic acid.