+ Reply to Thread
Results 1 to 2 of 2

cdo send send mail - getting my external .vbs script directly into a an excel worksheet

  1. #1
    Registered User
    Join Date
    01-03-2014
    Location
    Belgium
    MS-Off Ver
    Excel 2007
    Posts
    2

    cdo send send mail - getting my external .vbs script directly into a an excel worksheet

    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:

    Please Login or Register  to view this content.
    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

    Please Login or Register  to view this content.
    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?

    Please Login or Register  to view this content.
    Last edited by PieterBlan; 05-09-2014 at 05:09 AM.

  2. #2
    Registered User
    Join Date
    01-03-2014
    Location
    Belgium
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: cdo send send mail - getting my external .vbs script directly into a an excel workshee

    no replies yet...
    I found the solution myself however.
    This works:

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 03-11-2014, 12:24 PM
  2. Automatic send email (without even click send in mail software) with excel vba ??
    By alexnkc in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-17-2013, 08:31 PM
  3. [SOLVED] How do I send a xl-sheet as a mail using a VBA-script?
    By SOJ in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-01-2005, 05:20 PM
  4. Replies: 1
    Last Post: 11-09-2005, 05:00 PM
  5. Send Mail Script Help
    By JBL in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-22-2005, 06:05 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1