Email Excel File Automatically using Outlook 2000

  • Thread starter Thread starter Niraj
  • Start date Start date
N

Niraj

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 !!
 
after the code has finished grabbing the data, you could
try :

ActiveWorkbook.SendMail recipients:="(e-mail address removed)"

Rgds

Rog
 
Thanks Rog

-----Original Message-----
after the code has finished grabbing the data, you could
try :

ActiveWorkbook.SendMail recipients:="(e-mail address removed)"

Rgds

Rog



.
 
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 ("(e-mail address removed)"), ("Stock
Quotes - Time " & waittime)

If Counter = 13 Then

Exit Do

End If

Loop

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top