Sending emails specific date with excel and cdo
I have an excel spreadsheet with a list of resources names (A2:A25), Email list (B2:B25) start dates (C2:C25) and a message concerning their task.(D2:D25) I want to trigger and event that sends an email three days before the event date. I have done this with limited success going through outlook. Would rather use cdo and skip Outlook from what I have read. The workbook could remain open. This could run on either and xp machine or a server 2003. Would appreciate your help.
Re: Sending emails specific date with excel and cdo
you could run a daily windows scheduled task, that can run a vbs script (or vb app), to automate the specific workbook (opened or closed) and send the emails as required
Re: Sending emails specific date with excel and cdo
Using the scheduled task sounds like the right approach to take. Do you have a vb script available that would work for what I am wanting to accomplish?
Thanking you in advance
Re: Sending emails specific date with excel and cdo
Quote:
Do you have a vb script available that would work for what I am wanting to accomplish?
no, but it would be fairly basic
use getobject to automate the specific workbook
vb Code:
set mybook = getobject(fullpath\filename)
set sht = mybook.sheets(1)
for each c in sht.range("c2:c25")
if datediff("d", date, c) = 3 then ' 3 days, may require reversal of date and c
' send email
end if
next
Re: Sending emails specific date with excel and cdo
Thank you for the quick response. Used outlook and did get it to work.