How to Change the Office Product Key (2016 to 2024)
Updated by the Software Recycling support team
To change your Office product key, open Word or Excel, go to File > Account and choose Change License or Change Product Key, then enter the new 25-character key. For volume editions such as Pro Plus, run cscript ospp.vbs /inpkey with the new key, remove the old one with /unpkey, then activate with /act.
You can change the product key Office uses without uninstalling it, as long as the new key is for the edition and version already installed. There are two ways: the Change License option inside any Office app, and the ospp.vbs script for volume editions such as Office Pro Plus. This guide covers Office 2016, 2019, 2021 and 2024 on Windows.
Why you might need to change your Office product key
The most common reasons to replace a key are:
- Office was installed with a trial, a borrowed key or a key that has been blocked.
- The current key reached its activation limit and you have a replacement.
- A company PC is moving from one license to another.
- Office shows Unlicensed Product or Product Activation Failed and you have a new genuine key.
Before you start, check which edition is installed. Open Word, go to File > Account and read the name under Product Information. The new key must match it. A key for Office 2021 Pro Plus will not activate Office 2019, and a Pro Plus key will not activate Home & Business.
How to change the Office product key in File > Account
This is the simplest method and works for most installations.
- Open Word, Excel or any other Office app.
- Go to File > Account (in Outlook, File > Office Account).
- Under Product Information, select Change License. On some volume installs the link is called Change Product Key.
- If Office asks you to sign in, choose the option to use a product key instead, if it is offered.
- Enter the new 25-character product key and click Continue or Install.
- Follow the prompts to activate. Office activates online by default.
- Close all Office apps and open Word again. File > Account should show Product Activated.
If you are offline, or online activation fails, finish with our guide to activating Office by phone.
How to change the Office product key with ospp.vbs
The ospp.vbs script gives you full control over the keys installed on a PC. It is the method IT admins use for Office Pro Plus and other volume editions, and it works when the Change License link is missing.
Step 1: Open an administrator Command Prompt
Search for cmd, right-click Command Prompt and choose Run as administrator.
Step 2: Go to the Office folder
Office 2016, 2019, 2021 and 2024 all use the Office16 folder.
| Office and Windows | Folder |
|---|---|
| 64-bit Office | C:\Program Files\Microsoft Office\Office16 |
| 32-bit Office on 64-bit Windows | C:\Program Files (x86)\Microsoft Office\Office16 |
Type cd followed by the folder in quotes, for example:
cd "C:\Program Files\Microsoft Office\Office16"
Step 3: Check the current keys
cscript ospp.vbs /dstatus
The output lists every Office license on the PC. For each one, note the line Last 5 characters of installed product key. You need these characters to remove a key.
Step 4: Install the new key
cscript ospp.vbs /inpkey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
Replace the Xs with your new key, including the dashes between groups. You should see Product key installation successful.
Step 5: Remove the old key
cscript ospp.vbs /unpkey:ABCDE
Replace ABCDE with the last five characters of the old key from step 3. Repeat for any other old keys you no longer need, such as a trial or a blocked key.
Step 6: Activate the new key
cscript ospp.vbs /act
If activation succeeds, run /dstatus again. It should show LICENSE STATUS: ---LICENSED--- for the new key.
ospp.vbs commands at a glance
| Command | What it does |
|---|---|
/dstatus |
Shows installed keys and license status |
/inpkey:key |
Installs a product key |
/unpkey:last5 |
Removes a key by its last five characters |
/act |
Activates installed keys online |
/dinstid |
Shows the installation ID for phone activation |
/actcid:id |
Activates with a confirmation ID from the phone line |
Changing the key on Office 2024 Home & Business and Office for Mac
Retail editions such as Office 2024 Home & Business are usually redeemed at setup.office.com and linked to your Microsoft account. On these installs the license comes from the account, not from a key typed into the app. To use a different key:
- Redeem the new key at setup.office.com with the Microsoft account you want to use.
- In Office, go to File > Account, select Sign out, then sign in with that account.
- If Office still shows the old license, go to File > Account > Change License and pick the correct product from the list.
On a Mac, open Word, go to Word > Sign Out, then sign in with the account that holds the new license. Office for Mac activates on sign-in.
What if the new key is for a different edition?
If the new key is for a different edition (for example Home & Business to Pro Plus) or a different version (2019 to 2021), changing the key is not enough. You need to:
- Uninstall the current Office from Settings > Apps.
- Restart the PC.
- Install the edition that matches the new key.
- Enter and activate the key.
Our guide to installing and activating Office walks through this for each version.
Common problems when changing an Office key
| Problem | Likely cause | Fix |
|---|---|---|
| Key not accepted | Key is for a different edition or version | Install the matching edition |
| Old license still shows after the change | Old key not removed | Use /unpkey with the old key's last five characters |
| ospp.vbs not found | Wrong folder or Command Prompt not elevated | Check the Office16 path and run as administrator |
| Activation fails after a valid key | Key limit reached or no internet | Try phone activation, then contact support |
Need help?
All keys sold by Software Recycling LLC are genuine Microsoft product keys with guaranteed activation. If a key will not activate, we send a working replacement free of charge. Open a ticket at /support or call +1-888-470-5516, 7 days a week, and we will help you swap the key and finish activation.