Here we go...
Sub Send_Msg(sMsg As String)
Dim objOL As New Outlook.Application
Dim objMail As MailItem
Dim wshell As Object
'Activate ClickYes
Set wshell = CreateObject("wscript.shell")
wshell.Run ("""C:\Program Files\Express ClickYes\ClickYes.exe"" -activate")
DoEvents
Set objOL = New Outlook.Application
Set objMail = objOL.CreateItem(olMailItem)
With objMail
.To = Range("MyEmail")
.Subject = "test Mail Response"
.Body = sMsg
.Send
End With
'Kill Clickyes
wshell.Run ("""C:\Program Files\Express ClickYes\ClickYes.exe"" -stop")
Set objMail = Nothing: Set objOL = Nothing: Set wshell = Nothing
End Sub
Fwiw, I used a late bind to create the shell object. It's the way I coded it in the past, and... well... it ain't broke.
Hope it helps,
Ken