How can I detect if Powerpoint( MS Office) is activated?

L

lai

HI

I am writing some code to convert powerpoint file to other format.
I get runtime error when the office is not activated.
How can I detect if Powerpoint( MS Office) is activated from code?

Thanks
Yujing
 
L

lai

Can't you simply trap the error when it occurs?

y, you are right. This can be a solution.

On another hand, if can know the activation info, I can pop up more
detail to the user about why it fails. :)
 
L

lai

Understood.

I don't have an unactivated copy to test with. If you do, you might
have a look in the registry for differences between it and the registry
on an computer where Office has been activated.

Or better yet:

Export the registry of an unactivated computer
Activate office
Export the registry again

Compare the two exported files for differences.

Or another idea:

Force the situation to occur, trap the error number and google it.  If
you find that the error number is specific to an unactivated copy of
Office, you have a solution.

Or another:

You could write a small text file to the user's temp folder then delete
it.  If you encounter no errors there, then you know that you have
permissions sufficient for the next step:

Create a new windowless presentation in PPT, save it to the user's temp
folder.  If it errors, it's not 100% certain to be an activation issue,
but the odds are very very good.

==============================
PPT Frequently Asked Questionshttp://www.pptfaq.com/

PPTools add-ins for PowerPointhttp://www.pptools.com/

Thank you so much :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top