You can uninstall the Microsoft Office product key using Command Prompt, as follows:
- Open elevated Command Prompt window
- Execute command to access Office path
- Run command to view the last 5 characters of Office product key
- Execute command to uninstall Office product key.
First of all, open elevated CMD or Command Prompt.
Access the Microsoft Office folder in Command Prompt window. For that, you need to execute a command that will include the path of the MS Office folder where it is installed. For example, if a 64-bit version of Microsoft Office 2016 is installed in C Drive, then the command would be:cd C: > Program Files > Microsoft Office > Office16
You have to check by yourself where and which version of MS Office is installed and then execute the command accordingly.
Now run the command to check the last 5 characters of the installed product key of Microsoft Office. The command is: cscript ospp.vbs /dstatus

You can see the license status (activated or not) as well as the MS Office key’s last 5 characters. Copy those characters.
This is the final command for uninstalling the current product key.
The command is: cscript ospp.vbs /unpkey:ABCDEX
Replace ABCDE with the last 5 characters of MS Office key and execute the command. It will uninstall the Office key. When you will open Word or some other Office apps, it will prompt you to enter a product key.