LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Send email using Netscape

I would like to be able to include VBA code in a workbook, which will
automatically send an email message when certain criteria are
satisfied. I do not want to send a copy of a worksheet or workbook or
any other file - I just want to send a standard message to a known
internal email address.

I am using Excel 97 (SR-2) in Windows NT 4 (SP 6a)

Our company uses Netscape Communicator as our email tool. It uses an
IMAP server, (whatever that means). We are not able to send emails
using Outlook.

I have seen the advice from Ron de Bruin on using CDO to send emails,
(http://www.rondebruin.nl/cdo.htm), which does not depend on any
particular email software. Unfortunately this does not work for me. I
assume this is because I am using Windows NT? Any help would be greatly
appreciated.

The code I have is as follows. This Sub is called from another Sub when
the relevant conditions are satisfied. It generates an error at the
line indicated.


Sub Send_email()

Dim iMsg As Object
Dim iConf As Object

Application.ScreenUpdating = False

Set iMsg = CreateObject("CDO.Message") ' Error occurs on this line
Set iConf = CreateObject("CDO.Configuration")
With iMsg
Set .Configuration = iConf
.to = " ' enter real email address
here
.From = """Facility Centre weekly report generator""
" ' enter sender's email address
.Subject = "Weekly report differences"
.TextBody = "This is an automatically generated message." &
vbNewLine & vbNewLine & _
"There is at least one difference between" & vbNewLine &_
"this week's report and last week's." & vbNewLine &
vbNewLine & _
"You should open this week's report" & vbNewLine & _
"to view the differences."
.Send
End With

Set iMsg = Nothing
Set iConf = Nothing

Application.ScreenUpdating = True

End Sub


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
send email to each customer email in excel sheet. -keevill- Excel Discussion (Misc queries) 3 July 17th 08 02:33 PM
Send Email kirrages Excel Discussion (Misc queries) 3 May 23rd 07 06:00 PM
send wkbk as an email attachment with an email address copied from SueInAtl Excel Discussion (Misc queries) 0 May 21st 07 10:53 PM
body of email disappears when I send an email from Excel ~A Excel Discussion (Misc queries) 0 February 25th 05 10:55 PM
send email gall Excel Discussion (Misc queries) 1 February 23rd 05 10:43 PM


All times are GMT +1. The time now is 10:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"