I have an excel worksheet that collects some data from the internet every minute, some calculations are done & if this calculation gives a result = 1 in cell B1 of steet1 then an Email needs to be sent. For the moment I have the following code in the microsoft excel object of sheet1:
The external SendMailalarm_no_attachment.vbs script that is triggered has code that I based on code from http://www.paulsadowski.com/wsh/cdo.htm and http://www.rondebruin.nl/win/s1/cdo.htm (thanks guys)
to send an alarm Email, triggerd by an excel cell value, with cdo from a Gmail address with SSL
This all works perfectly (WIN 8 - excel 2013) but I now want to put the external SendMailalarm_no_attachment.vbs script directly into the microsoft excel object of sheet1 so that I can get the EmailTo, EmailSubject and EmailBody from a cell in my sheet1 of my excel workbook.
I thought I could just coppy the code of SendMailalarm_no_attachment.vbs to where I now have the line Shell "Explorer.exe ""C:\SendMailalarm_no_attachment.vbs""", 1
(see below) but the code below does not work .... it would have been too easy I guess...
Can anyone tell me what I'm doing wrong in the code below?
Bookmarks