Setting up time restricted demo

Add-in Express™ Support Service
That's what is more important than anything else

Setting up time restricted demo
How to abort load? 
George Spears

Posts: 73
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).

Posted 07 Nov, 2014 05:42:32 Top
Andrei Smolin

Add-in Express team

Posts: 16840
Joined: 2006-05-11
Hello George,

You cannot prevent your add-in from loading. A workaround is described in How to load your Office COM add-in 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!

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 10 Nov, 2014 06:01:32 Top