This is more a cross-over between TNG on TV and the movie Star Trek: Generations. In the episode where the TNG crew rescues Scotty from the Dyson sphere (I forget the title). He says that it must of been Capt. Kirk that mounted the rescue expedition when he didn't arrive at the planet he was going to retire on. In the movie ST: Generations - Scotty was on the Enterprise at the time of Kirk's "death" (and Kirk was presumed dead until Picard finds him in the Nexus).