1.wps2003和wps2005实现的接口方法是一样的,只是他们的方法名称有所变化,而且在wps2003中写的插件,不用修改可以直接在wps2005中使用,开发wps插件 Option Explicit Implements IKExtensibility 这儿可以定义一些全局变量进行使用 Private WithEvents wpsApp As WPS.Application Private Sub Class_Terminate() If Not (wpsApp Is Nothing) Then Set wpsApp = Nothing End If End Sub Private Sub IKExtensibility_OnAddInsUpdate(Optional custom As Variant) 这个方法在插件有改变并重新注册后会执行 End Sub
Private Sub IKExtensibility_OnBeginShutdown(Optional custom As Variant) 这个方法在 End Sub
Private Sub IKExtensibility_OnConnection(ByVal Application As Object, Optional ByVal connectmode As Long, Optional ByVal addininst As Object, Optional custom As Variant) Set wpsApp = Application End Sub
Private Sub IKExtensibility_OnDisconnection(Optional ByVal removemode As Long, Optional custom As Variant) If Not (wpsApp Is Nothing) Then Set wpsApp = Nothing End If End Sub
Private Sub IKExtensibility_OnStartupComplete(Optional custom As Variant)
End Sub
'在关闭Wps文档时执行 Private Sub wpsApp_DocumentBeforeClose(ByVal Doc As WPS.Document, Cancel As Boolean) End Sub
WPS插件开发指南
本文介绍了如何为WPS 2003和WPS 2005开发插件,详细阐述了实现接口的方法及关键步骤。由于这两个版本的接口方法基本相同,因此插件可以在不同版本间通用。文中提供了具体的代码示例,展示了如何实现插件的连接、断开连接、启动完成等重要事件。
3万+

被折叠的 条评论
为什么被折叠?



