The thioesterase domain of the polyketide synthase involved in the biosynthesis of the 20-membered macrolactam antibiotic vicenistatin (VinTE) was found to catalyze oligomerization and macrocyclization of omega-hydroxy fatty acid ethyl esters to afford 17-28-membered macrocyclic lactones. The ring sizes of the macrocycles appear to be limited to the more moderate sizes because of the space limitation of the active site of VinTE. It was also verified that the initially formed linear dimer is first released from the active site of VinTE and then is recognized again by VinTE prior to its transformation to the cyclic dimer.