How it is correctly to implement IDTExtensibility2 interface for Office COM Add-In?

非 Y 不嫁゛ 提交于 2019-12-05 15:02:41

Note that 1,2 and 6 are not Outlook-addin-specific tasks.

3 is not needed: As an addin you don't create a session - you get connected with an existing one (by implementing the OnConnection method).

For 4 and 9 I recommend using RDO: http://dimastr.com/redemption/ (can also be used for 3 if you really need another session)

For 5,7 and 8 I recommend using ADX: http://www.add-in-express.com/add-in-net/
(you won't actually have to worry about IDTExtensibility2 at all anymore if you do this)

OnConnection is where you grab your reference to the Application interface from which you can derive everything else.

OnStartupComplete is where you can put all your initialization code.

OnDisconnection is where you should release all remaining OOM references you may have accumulated during the session, i.e everything that was derived from the initial Application reference that you received via OnConnection.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!