Imports System.Runtime.InteropServices
<Assembly: ComVisible(False)>
<Assembly: ClassInterface(ClassInterfaceType.None)>
<ComVisible(True), Guid("XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"), InterfaceType(ComInterfaceType.InterfaceIsDual)> _
Public Interface SubsToExpose
<DispIdAttribute(1)> Sub Load(ByVal strConn As String, ByVal strSelect As String, ByVal strTemDoc As String, ByVal strArcDoc As String)
<DispIdAttribute(2)> Sub ExecuteWord()
'NOTE: If you add in more methods, increment DispIdAttribute by one for each...
End Interface
<ComVisible(True), Guid("XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"), ClassInterface(ClassInterfaceType.None), ProgId("YourLibNameHere.YourClassNameHere")> _
Public NotInheritable Class clsAutomation
Implements SubsToExpose
Private Sub SubsToExpose_Load(ByVal strConn As String, ByVal strSelect As String, ByVal strTemDoc As String, ByVal strArcDoc As String) Implements SubsToExpose.Load
On Error GoTo ShowError
gstrTitle = Diagnostics.Process.GetCurrentProcess.ProcessName
gstrConn = strConn
gstrSelect = strSelect
gstrTemDoc = strTemDoc
gstrArcDoc = strArcDoc
SetLicence()
Exit Sub
ShowError:
InfoError(Err.Number, Err.Description)
Exit Sub
End Sub
Private Sub SubsToExpose_ExecuteWord() Implements SubsToExpose.ExecuteWord
On Error GoTo ShowError
ReplaceWord()
Exit Sub
ShowError:
InfoError(Err.Number, Err.Description)
Exit Sub
End Sub
End Class