I've read somewhere that "new" transmissions are not exactly new, but they are actually factory rebuilds. Only few manufacturers sell genuinely new transmission units.
Are you the one who will rebuild it or go to a mechanic? If you're going to get a new transmission, you have to look for the right parts such as transmission rebuild kits. Another cheaper option would be going to reputable transmission shops that will offer you rebuilds with warranty.
what's your budget, by the way? if you're planning to get a new ride you have to take note of the price too.
Volvo has a lifetime warranty on parts and labor. My '05 S40 2.4 will need one soon and that's my plan. I've upgraded the suspension and done enough other mods that I'm hooked. The engine is solid and she rides better than when new, except for the occasional reminder that the tranny is not far away.