Yep. It will work. If you do an update of your Windows 7 system to Windows 10, you won't need to do anything. It'll just work on Windows 10.
If you do a clean installation of Windows 10, you'll still be able to use your Office product key to reinstall Office '07.