Skip to main content

How to Fix: Office showing Microsoft 365 or not accepting your product key

Here’s how to remove old or incorrect Office license keys from your PC.

Updated this week

If you’ve installed Office and opened Word or Excel — but it says Microsoft 365, or asks you to sign in without letting you activate your key — there may be an old or incorrect license still saved on your computer.

This guide shows how to remove leftover Office keys, whether you’re fixing this issue or just want to reset Office licensing on your device.


Step-by-step: How to remove old Office product keys

Follow these steps carefully.

1. Sign out and close all Office apps

  • Open any Office program (like Word)

  • Sign out from the account (if logged in)

  • Close all Office windows completely


2. Open the Command Prompt

  • Press Windows key + R on your keyboard

  • In the window that appears, type: cmd and press Enter

This opens a black command window.


3. Find the correct folder for Office

In the Command Prompt, type one of the following (depending on your installation):

cd C:\Program Files (x86)\Microsoft Office\Office16

If you get an error or the folder doesn’t exist, try this instead:

cd C:\Program Files\Microsoft Office\Office16

Then press Enter after either command.


4. List the active Office product keys

Type the following command and press Enter:

cscript ospp.vbs /dstatus

This shows a list of all Office product keys currently installed. Look at the last five characters of each key — you’ll use these in the next step.


5. Remove the product key

To remove a key, type the following command, replacing xxxxx with the last five digits of the key you want to remove:

cscript ospp.vbs /unpkey:xxxxx

You can repeat this for each key you’d like to remove.


6. Restart your computer

Once all old keys are removed, restart your PC to finish the cleanup.


7. Reactivate Office

After restarting:

  • Open any Office program

  • Enter your correct product key when prompted, or go to Account > Activation to enter it manually.


Still seeing the wrong version?

If Office still shows the wrong version (e.g. Office 2021 instead of Office 2024), you can try this alternative method: Fix Office showing as the wrong version

Did this answer your question?