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