Applies ToOneNote for Microsoft 365Visio Plan 2OneNote for Microsoft 365 for MacExcel 2024Word 2024Outlook 2024PowerPoint 2024Access 2024OneNote 2024Project Professional 2024Project Standard 2024Visio Standard 2024Office 2024Excel 2024 for MacOneNote 2024 for MacExcel 2021Word 2021Outlook 2021PowerPoint 2021Access 2021Project Professional 2021Project Standard 2021Publisher 2021Visio Professional 2021Visio Standard 2021Office 2021OneNote 2021Excel 2021 for MacOneNote 2021 for MacExcel 2019Word 2019Outlook 2019PowerPoint 2019Access 2019Project Professional 2019Project Standard 2019Publisher 2019Visio Professional 2019Visio Standard 2019Office 2019Excel 2016Word 2016Outlook 2016PowerPoint 2016Access 2016OneNote 2016Project Professional 2016Project Standard 2016Publisher 2016Visio Professional 2016Visio Standard 2016Office 2016
This article applies to Office Home & Business, Office Professional, and individually purchased Office apps. To switch an Office install to or from Microsoft 365, see Switch your Office license.
Change the product key for your version
How you change the product key depends on your version of Office. Select your Office version from the tabs below.
Best practice for multiple versions of Office
If you bought multiple copies of Office and used the same Install button to install Office on multiple PCs, activation fails on the other PCs. This happens because each Install button is associated with a unique product key that can only be installed on one PC. To fix this, you can change the product key for the other PCs where you installed Office.
Most versions of Office 2024, Office 2021, and Office 2019 don’t include a product key and you only need to sign in with the account already linked to your Office license.
If your version did include a product key, follow the steps under the 2016 tab.
On the device where you want to change the key, open any Office app, select the File menu and then select Account near the bottom of the menu.
Under Product Information, select the Switch License button.
If you're signed in, select Use a different account, and then select Enter product key instead.
If you're not signed in, select Enter product key instead.
Enter your Office 2016 product key, and then select Install this product instead.
If your product key is new, follow the prompts to complete the redemption process.
Office begins the update process. Close all Office apps to finish the process.
Sign in to your Subscriptions page with the email and password associated with the Microsoft account that was used to install Office.
After you sign in, you should see a list of Office products that are associated with your Microsoft account.
For the first product that's listed on the page, select View product key. Copy or write down the product key. This is likely the product key that was used multiple times to install Office.
Select View product key for the remaining Office products and copy or write them down. These are likely the keys that you'll use to replace the key that was used multiple times.
On a PC where Office activation is failing, open the Command Prompt as described below:
Windows 10 and Windows 8.1
Windows 7
Select the Start button (lower-left corner).
Type Command Prompt.
Right-click the Command Prompt icon, and select Run as administrator.
Select the Start button (lower-left corner).
Right-click Command Prompt and select Run as administrator.
From the drop-down list below, select your Office version and Windows version (32-bit or 64-bit) and run the commands as described.
Tip: If you get an Input Error: Can not find script file... message, it means that you used the wrong command. Don’t worry, running the wrong command won’t hurt anything. Double-check your Office and Windows versions and try a different command.
Copy the following command, paste the command into the Command Prompt window, and then press Enter.
The command prompt displays the last five characters of the product key that was used to install Office on the PC. Our example below uses XXXXX to represent these characters.
Copy the following command, paste the command into the Command Prompt window, and replace XXXXX with the last 5 digits of the product key that was shown in the previous step. Press Enter to remove the product key.
Copy the following command, paste the command into the Command Prompt window, and replace XXXXX-XXXXX-XXXXX-XXXXX-XXXXX with an unused product key from your list. Press Enter to change the key.
Tip: If you get an Input Error: Can not find script file... message, it means that you used the wrong command. Don’t worry, running the wrong command won’t hurt anything. Double-check your Office and Windows versions and try a different command.
Copy the following command, paste the command into the Command Prompt window, and then press Enter.
The command prompt displays the last five characters of the product key that was used to install Office on the PC. Our example below uses XXXXX to represent these characters.
Copy the following command, paste the command into the Command Prompt window, and replace XXXXX with the last 5 digits of the product key that was shown in the previous step. Press Enter to remove the product key.
Copy the following command, paste the command into the Command Prompt window, and replace XXXXX-XXXXX-XXXXX-XXXXX-XXXXX with an unused product key from your list. Press Enter to change the key.
Tip: If you get an Input Error: Can not find script file... message, it means that you used the wrong command. Don’t worry, running the wrong command won’t hurt anything. Double-check your Office and Windows versions and try a different command.
Copy the following command, paste the command into the Command Prompt window, and then press Enter.
The command prompt displays the last five characters of the product key that was used to install Office on the PC. Our example below uses XXXXX to represent these characters.
Copy the following command, paste the command into the Command Prompt window, and replace XXXXX with the last 5 digits of the product key that was shown in the previous step. Press Enter to remove the product key.
Copy the following command, paste the command into the Command Prompt window, and replace XXXXX-XXXXX-XXXXX-XXXXX-XXXXX with an unused product key from your list. Press Enter to change the key.
Tip: If you get an Input Error: Can not find script file... message, it means that you used the wrong command. Don’t worry, running the wrong command won’t hurt anything. Double-check your Office and Windows versions and try a different command.
Copy the following command, paste the command into the Command Prompt window, and then press Enter.
The command prompt displays the last five characters of the product key that was used to install Office on the PC. Our example below uses XXXXX to represent these characters.
Copy the following command, paste the command into the Command Prompt window, and replace XXXXX with the last 5 digits of the product key that was shown in the previous step. Press Enter to remove the product key.
Copy the following command, paste the command into the Command Prompt window, and replace XXXXX-XXXXX-XXXXX-XXXXX-XXXXX with an unused product key from your list. Press Enter to change the key.
Tip: If you get an Input Error: Can not find script file... message, it means that you used the wrong command. Don’t worry, running the wrong command won’t hurt anything. Double-check your Office and Windows versions and try a different command.
Copy the following command, paste the command into the Command Prompt window, and then press Enter.
The command prompt displays the last five characters of the product key that was used to install Office on the PC. Our example below uses XXXXX to represent these characters.
Copy the following command, paste the command into the Command Prompt window, and replace XXXXX with the last 5 digits of the product key that was shown in the previous step. Press Enter to remove the product key.
Copy the following command, paste the command into the Command Prompt window, and replace XXXXX-XXXXX-XXXXX-XXXXX-XXXXX with an unused product key from your list. Press Enter to change the key.
Tip: If you get an Input Error: Can not find script file... message, it means that you used the wrong command. Don’t worry, running the wrong command won’t hurt anything. Double-check your Office and Windows versions and try a different command.
Copy the following command, paste the command into the Command Prompt window, and then press Enter.
The command prompt displays the last five characters of the product key that was used to install Office on the PC. Our example below uses XXXXX to represent these characters.
Copy the following command, paste the command into the Command Prompt window, and replace XXXXX with the last 5 digits of the product key that was shown in the previous step. Press Enter to remove the product key.
Copy the following command, paste the command into the Command Prompt window, and replace XXXXX-XXXXX-XXXXX-XXXXX-XXXXX with an unused product key from your list. Press Enter to change the key.