DavidT543
Guest
|
Hi Guys,
I need access to Outlook public folders, and sometimes when offline or for other reasons they may not be available.
Is there a global way to stop the add-in loading if stuff I need is missing. So for example if when I am going through the initialization tests for my app i find that I don't have access to something important?
I have lots of objects (forms, events being tracked etc) and if there is a way to just unload the app this time that would be handy - rather than having to stop each item when it tries to start. (Next time Outlook starts it may be Online so the apps should run as normal) |
|
Eugene Astafiev
Guest
|
Hi David,
Please have a look at the http://www.add-in-express.com/forum/read.php?FID=5&TID=5954&MID=29408#message29408 forum thread. It states:
Unfortunately you can't disable the add-in on the fly. Instead you can disable or remove the UI and logic of the add-in.
To achieve this, you can remove all components from the add-in module (and unsubscribe from its events) in two events of the add-in module:
- OnRibbonBeforeCreate; it's the first event that occurs if your add-in is loaded by a Ribbon-enabled Office application
- AddinInitialize; it's the first event that occurs if your add-in is loaded by a nonRibboned Office application. |
|