You can run the vbs-file in the following way It’s pretty safe to state that these 5 characters would already be more than enough to find out which Product Key you have used (as you should already have safely stored the full Product Key code somewhere else together with your other license information).
Office 2010 and later include a vbs-script which will reveal the last 5 characters of your Product Key. Find license keys for Office 2010, Office 2013, Office 2016 and Office 2019 via a script The same applies to Office 2016 and Office 2019 licenses that are linked to your Microsoft Account.
Note: Microsoft 365 installations don’t require a license key as they activate automatically when you log on to Office with your Microsoft Account. However, for either version there is no need to completely reinstall Office. The proper method to determine or change the Product Key depends on your version of Office or Outlook. While you could simply try one of your Product/License Keys and see if it gets accepted, it’s not a very sophisticated approach. How can I find out which license I've used for which computer and how can I change the key if needed? I've got several licenses for Office and Outlook but I'm not sure which one which ones I've used and which ones are free.