Plug and play swap is pretty much limited to '88 to '94 A4LD's from behind 2.9 and 4.0 L engines. Note that the 4.0 L A4LD's ('91 to '94) came from the factory with stronger internals, so one usually prefers those (or rebuild the 2.9 L A4LD to 4.0 specs, but this question is also usually asked because one is trying to avoid the rebuild).
The '99 transmission alluded to in your title can probably be made to work, if one has enough money, time, and ingenuity, but it won't be a quick "plug and play" swap.