Yes you can, I do so when I replaced my old computer. If you have and issue
with activating it contact MS support and tell them what you are doing.
They have helped me out in the past. I am also frequently modernizing my
machine and after X amount of hardware changes office may ask you to
reactivate it. In these instances MS support has always helped me out.