  CONTEXT. Many O-type stars have nearby companions whose presence hamper their
characterization through spectroscopy.
  AIMS. We want to obtain spatially resolved spectroscopy of close O-type
visual binaries to derive their spectral types.
  METHODS. We use the Space Telescope Imaging Spectrograph (STIS) of the Hubble
Space Telescope (HST) to obtain long-slit blue-violet spectroscopy of eight
Galactic O-type stars with nearby visual companions and use spatial-profile
fitting to extract the separate spectra. We also use the ground-based Galactic
O-Star Spectroscopic Survey (GOSSS) to study more distant visual components.
  RESULTS. We spatially resolve seven of the eight systems, present spectra for
their components, and obtain their spectral types. Those seven multiple systems
are iota Ori Aa,Ab,B, 15 Mon Aa,Ab,C, tau CMa Aa,Ab,B,C,D,E, HD 206 267
Aa,Ab,C,D, HD 193 443 A,B, HD 16 429 Aa,Ab, and IU Aur A,B. This is the first
time that spatially resolved spectroscopy of the close visual binaries of those
systems is obtained. We establish the applicability of the technique as a
function of the separation and magnitude difference of the binary.
