Sending e-mail from Vis Basic

I know how to send an e-mail from VB based on results of an excel spreadsheet operation. Is there a way to delay sending the e-mail. I want to use it as a follow-up tool for sales leads.
[187 byte] By [ChuckinPhoenix] at [2007-12-16]
# 1
If all you want it to suspend your code for a few seconds, you could dllimport the old sleep() function. (other ways to stop code excution, but this is easy)
Most of the time it's the programmer that chooses when to send the email.
Could you re-write to simply send later when the user clicks a button to do so?
Maybe even tie in a form_closing event trigger and have it send the email then.
Dustin_H at 2007-9-9 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 2
Thanks for the reply Dustin. I would like to delay sending the e-mail for a number of days. It would be nice for the sending trigger to be a date. I'd like to use it as a reminder to take some action based on spreadsheet inputs. I'm thinking there might be a way to use Outlook Follow Up (Add Reminder) features.
ChuckinPhoenix at 2007-9-9 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 3
I don't know if you can set a property that says "E-Mail on this Date/Time".

I wonder if this would work for you, create and store the mail in the Drafts, or some other, folder. Then, you can have a process of your own that finds these mails and determines whether to send them.

DavidGuyerMS at 2007-9-9 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 4
Thanbks,
I'm going to play with this idea and see if it works.
ChuckinPhoenix at 2007-9-9 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 5

Another way you can do it is to calculate the date now minus the date on the excel sheet.
Assume that sDate , which i set to 07/21/2005, is the date from the cell in your excel sheet.

Dim sDate As Date = "07/21/2005"
Dim Diff As Integer = DateDiff(DateInterval.Day, sDate, Date.Now)
If Diff > 1 Then 'If the date difference is more then 1.
'Create and send email now
End If

Dustin_H at 2007-9-9 > top of Msdn Tech,Visual Basic,Visual Basic General...