Electron-ion-ion coincidence measurements carried out at discrete resonances near the N 1s threshold in ammonia are reported. The measured coincidence spectra show clear alignment of the molecule upon resonant core-electron excitation. The coincidence data are analyzed to extract information about the molecule in the excited state by simulating the alignment and the dissociation processes. Dynamic changes in molecular geometry are found as the photon energy is scanned through the N 1s-->4a(1) resonance, whereas for the N 1s-->2e state the geometry and kinetic energy released upon dissociation remain unchanged. The alignment of the core-excited molecules is found to be preserved even in two-step dissociation processes.