TAutoObjectFactory.Create(ComServer, TAddIn, Class_AddIn, Procedure TAddIn.OnStartupComplete( var custom: PSafeArray) Procedure TAddIn.OnDisconnection(RemoveMode: ext_DisconnectMode ShowMessage('Das AddIn wurde gestartet')
Procedure TAddIn.OnConnection( const Application: IDispatch ĬonnectMode: ext_ConnectMode const AddInInst: IDispatch īegin // To show, that the AddIn has started just say anything Procedure TAddIn.OnBeginShutdown( var custom: PSafeArray) procedure TAddIn.OnAddInsUpdate( var custom: PSafeArray) create a DWOrd "LoadBehavior" with the value 3 Create a new key: HKEY_CURRENT_USER\Software\Microsoft\Office\Outlook\Addins\OLAddIn.AddIn Register the AddIn, so that the Addin will be recognized by Outlook Register the COM-object with "run / register ActiveX Server" Procedure OnBeginShutdown( var custom: PSafeArray) safecall Īnd complete the class by pressing Ctrl-Shft-C Procedure OnStartupComplete( var custom: PSafeArray) safecall Procedure OnAddInsUpdate( var custom: PSafeArray) safecall Procedure OnDisconnection(RemoveMode: ext_DisconnectMode var custom: } procedure OnConnection( const Application: IDispatch ConnectMode: ext_ConnectMode Ĭonst AddInInst: IDispatch var custom: PSafeArray) safecall Как написать Outlook AddIn Delphi, Интернет и Сети, Почтовый клиент For all the things Outlook does well, handling add-ins (or add-ons, as they’re calling in other programs) isn’t one of them. the add-in will be enabled, but the end user will not notice that.Įven if you add the LoadBehavior key to the corresponding HKCU hive, the add-in will be loaded next time Outlook is started.Как написать Outlook AddIn. At runtime you can check whether a user is authorized to load your add-in or not, based on the authentication results you can decide whether to load the add-in's UI and other business logic (subscribe to Outlook events and etc.) or not. That is why I'd suggest disabling all features of your add-in at runtime instead of trying to turn it off. This is expected behavior - normal user can't disable the Addin for all users.īe aware, in that case the add-in will be disabled for the current user only. But the value of 'LoadBehavior' under HKEY_LOCAL_MACHINE has not changed. If I look at the registry, the value of 'LoadBehavior' of the Addin under HKEY_CURRENT_USER has changed. It means that you can add a HKCU entry to get it done. You can disable the add-in manually in Outlook, even a per-machine add-in. But on a system with UAC enabled, in addition to having administrative permissions, the application process must be elevated. Of course, for a per-machine add-in, you can set the Connect property if your application is run with administrative permissions. Most probably the add-in was registeredin the HKLM hive, am I right?
REMOVE DYMO OUTLOOK ADDIN WINDOWS
A normal user doesn't have sufficient privileges for modifying the windows registry keys for the add-in. You need to be a local admin or a power user to be able to modify HKLM.