Ruslan Plakhuta
Posts: 76
Joined: 2008-07-01
|
Hi all!
I have add-in integration for Word, Excel, Outlook, PPT and I want dynamically configurates add-in integration when a dll is registering.
For example - I have in the regisrty or in an "ini" file the key which disable/enable my add-in integration for Word.
I reads this key and sets the SupportedApp property when the OnAfterAddinRegister event fired:
with Tinifile.Create('reg.ini') do
try
bWord := ReadBool('reg', 'word', false);
finally
free;
end;
if bWord then
begin
if not (ohaWord in SupportedApps) then
self.SupportedApps := self.SupportedApps + [ohaWord];
end else begin
if ohaWord in SupportedApps then
self.SupportedApps := self.SupportedApps - [ohaWord];
end;
Somtimes it`s working fine, but sometimes it is not working
:(
Could someone explain me why it happens?
Maybe another way exists, please suggest! |
|
Andrei Smolin
Add-in Express team
Posts: 18825
Joined: 2006-05-11
|
Hello Ruslan,
I've just tested doing a similar thing in OnCreate. It works fine for me.
Andrei Smolin
Add-in Express Team Leader |
|