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

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
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,215,521
Messages
6,125,306
Members
449,218
Latest member
Excel Master

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