I actually think a 2017 MacBook Pro has a better chance at being used 10 years than the 2007 MacBook Pro had. Sure, you could upgrade the RAM and Hard Drive with the older machine - but the SSDs in the new MBPs are lightning fast, they probably will still be absolutely fine to use in ten years time. In contrast, the 2.5" 5400 rpm HDDs Apple used ten years ago felt relatively slow, even back then.
As for RAM, yeah, you could upgrade the machines back then after you bought them - but only up to the amount the CPU supports. Now, you have to make that decision when you buy the notebook, however, the limit to the maximum possible RAM stays the same.
But more importantly, you couldn't upgrade the CPU or GPU in either machine. And this is were the 2007 MBP struggles the most when you use it today - even a 720p YouTube video would severely stress the CPU. Will current CPUs hold up better in ten years time? We won't know. But I have a feeling that streaming a 720p video on a 2017 MBP in 2027 will be more fun than doing the same task on a 2007 MBP in 2017.
Will you able to get any demanding work done on any 10 year old computer? Probably not. The additional time the machine takes to do the tasks you want it to most probably would lose far more money than what a new notebook costs.