Email Excel File Automatically using Outlook 2000
This is how I finally got it working.
Since I wanted to grab the data from Web every 30 minutes
and then email me the file automatically .
Let me know if there are any better ways of doing it.
Sub Email()
Dim newHour, newMinute, newSecond As String
Dim Counter As Integer
Counter = 0
Do
Counter = Counter + 1
newHour = Hour(Now())
newMinute = Minute(Now()) + 35
newSecond = Second(Now())
waittime = TimeSerial(newHour, newMinute, newSecond)
Application.Wait waittime
'MsgBox "The name of the active workbook is " &
ActiveWorkbook.Name
ActiveWorkbook.SendMail "), ("Stock
Quotes - Time " & waittime)
If Counter = 13 Then
Exit Do
End If
Loop
End Sub
-----Original Message-----
after the code has finished grabbing the data, you could
try :
ActiveWorkbook.SendMail "
Rgds
Rog
-----Original Message-----
I have a excel file. The data in this file gets
refreshed
every 30 minutes (using WebQuery). I want this file to
be
sent to me at my work email ID once the refresh is
complete.
Is there a way to do this automatically ? I could write
a
macro but manual intervention is needed. So wondering if
anyone has any idea on this ?
I am eusing Excel 2000 and Outlook 2000.
Thanks in advance !!
.
.
|