How to check the activation status of MS Office

kelly mort

Well-known Member
Joined
Apr 10, 2017
Messages
2,169
Office Version
  1. 2016
Platform
  1. Windows
Hello and Happy new year,

I am looking for a way to check the activation status of Microsoft Office when ever I open my workbook.

If that is possible with vba, can someone show me the way to go?

Thanks and have a great moment.
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Thanks a lot @Jaafar Tribak
I am using Windows 10 64Bit and Office 365 32 Bit and I got empty string in the message box
The file is already there in this path C:\Program Files (x86)\Microsoft Office\Office16\OSPP.VBS
 
Upvote 0
@kelly mort Step through the code and see what you have after the following line is executed:

VBA Code:
        sCommand = "CD " & Environ("SystemDrive") & "\" & Right(.Path, Len(.Path) - InStr(.Path, "\"))

Hover the mouse over 'sCommand' and paste back here what that variable equals.

@YasserKhalil That applies to you also.
 
Upvote 0
sCommand in the immediate window is CD C:\Program Files (x86)\Microsoft Office\Root\Office16
I tried your code and I can get a string in the message box which is in capital letters "NOTIFICATIONS"
 
Upvote 0
That normally means that the license has expired or could not be activated with the last registration key entered.

You could run CMD prompt as Admin and paste the following command into the CMD window:

cd c:\Program Files (x86)\Microsoft Office\Office16&cscript ospp.vbs /dstatus

That will give you more info underneath where it says ---NOTIFICATIONS---
 
Upvote 0
@johnnyL
This is what I get:

Code:
.Path = "C:\Program Files (x86)\Microsoft Office\Root\Office16"
 
Upvote 0

Forum statistics

Threads
1,224,830
Messages
6,181,225
Members
453,025
Latest member
Hannah_Pham93

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top