The ISO LWS spectrometer offers a unique opportunity to directly investigate the properties of several OH infrared lines in absorption against compact HII regions. Using observations of several optically thick and thin IR lines connecting the low lying rotationnal levels of OH and 18OH, we wish to analyze the excitation and abundance of the dense gas immediately adjacent to a sample of compact HII regions selected according to their radio characteristics.