George Spears
Posts: 79
Joined: 2010-05-06
|
For an excel plug, written in Delphi XE6... I want to release a beta version. I want it to be time restricted.
Checking the date is easy enough... But there are two issues (1) Where is the proper place to check to see if date has passed (OnAddInInitialize ??) and (2) what is the proper way to abort the load? (By abort, I mean ideally I do not even want to see my menu on the ribbon bar).
Thanks |
|
Andrei Smolin
Add-in Express team
Posts: 18821
Joined: 2006-05-11
|
Hello George,
You cannot prevent your add-in from loading. A workaround is described in http://www.add-in-express.com/creating-addins-blog/2012/01/20/load-office-addin-on-condition/. Although this blog relates to the .NET edition of Add-in Express, the whole idea is applicable to the VCL edition as well. The points that differ for Delphi are these:
- the code sample supplied with the blog isn't applicable
- instead of disconnecting the events, you set a flag and check this flag in the event handlers so that no job is done if the flag is set
Pay attention to comments on that page!
Andrei Smolin
Add-in Express Team Leader |
|