M
michael c
Hi. I had a program looping through code and sending
emails fine until I upgraded to Outlook 2003 and now I'm
dealing with the security patch issue. I installed a
reference to Microsoft CDO for NTS 1.2 Library in Access.
Based on some reading, I was hoping to use the SMTP
Service to send mail directly. I'm not sure if the SMTP
service is running on my machine (if you know how I can
find out, that'd be great) and I have internet access on a
coroporate network running NT 2000. My OS is 2000 and my
Office Suite is 2003.
I'm hoping that sending it using the code below would work
and that I'd be able to bypass Outlook, but I'm getting
hung up on an error that says "Compile error. Invalid use
of property" in the .From statement. Does that mean I need
to add a reference to a library? Any suggestions would be
a huge help! Thanks!!!
Option Compare Database
Dim oNewMail As New CDONTS.NewMail
Private Sub SendMail()
oNewMail.From "(e-mail address removed)"
oNewMail.To "(e-mail address removed)"
oNewMail.BodyFormat = CdoBodyFormatText
oNewMail.Body = "Test"
oNewMail.Importance = CdoHigh
oNewMail.AttachFile "C:\Test.xls"
oNewMail.Send
End Sub
emails fine until I upgraded to Outlook 2003 and now I'm
dealing with the security patch issue. I installed a
reference to Microsoft CDO for NTS 1.2 Library in Access.
Based on some reading, I was hoping to use the SMTP
Service to send mail directly. I'm not sure if the SMTP
service is running on my machine (if you know how I can
find out, that'd be great) and I have internet access on a
coroporate network running NT 2000. My OS is 2000 and my
Office Suite is 2003.
I'm hoping that sending it using the code below would work
and that I'd be able to bypass Outlook, but I'm getting
hung up on an error that says "Compile error. Invalid use
of property" in the .From statement. Does that mean I need
to add a reference to a library? Any suggestions would be
a huge help! Thanks!!!
Option Compare Database
Dim oNewMail As New CDONTS.NewMail
Private Sub SendMail()
oNewMail.From "(e-mail address removed)"
oNewMail.To "(e-mail address removed)"
oNewMail.BodyFormat = CdoBodyFormatText
oNewMail.Body = "Test"
oNewMail.Importance = CdoHigh
oNewMail.AttachFile "C:\Test.xls"
oNewMail.Send
End Sub