D
DS
I'm sorry I posted this before, and for whatever reason the answer is now
gone. I have a new computer and my newsgroups are totally messed up.
Sometimes I can post, sometimes I can, Things are here then they are not!
Anyways heres my question again.
I have this code that works very well, except I want to send the contents of
a small report in the body of an E-Mail. Right now I'm transferring the
report to a txt file, works fine. How can I get that to the body of the E-
Mail?
Const cdoSendUsingPort = 2
Const cdoBasic = 1
Dim objCDOConfig As Object, objCDOMessage As Object
Dim strSch As String
strSch = "http://schemas.microsoft.com/cdo/configuration/"
Set objCDOConfig = CreateObject("CDO.Configuration")
With objCDOConfig.Fields
.Item(strSch & "sendusing") = cdoSendUsingPort
.Item(strSch & "smtpserver") = "mail.optonline.net"
.Item(strSch & "smtpauthenticate") = cdoBasic
.Item(strSch & "sendusername") = "Big Corp"
.Item(strSch & "sendpassword") = "99"
.Update
End With
Set objCDOMessage = CreateObject("CDO.Message")
With objCDOMessage
Set .Configuration = objCDOConfig
.FROM = "Big Corp"
.sender = "(e-mail address removed)"
.TO = "(e-mail address removed)"
.subject = "SALES UPDATE"
.TextBody = "This should be the contents of the text file that is
from the report "
.SEND
End With
Set objCDOMessage = Nothing
Set objCDOConfig = Nothing
Once again I am sorry for the repost,
Thanks
DS
gone. I have a new computer and my newsgroups are totally messed up.
Sometimes I can post, sometimes I can, Things are here then they are not!
Anyways heres my question again.
I have this code that works very well, except I want to send the contents of
a small report in the body of an E-Mail. Right now I'm transferring the
report to a txt file, works fine. How can I get that to the body of the E-
Mail?
Const cdoSendUsingPort = 2
Const cdoBasic = 1
Dim objCDOConfig As Object, objCDOMessage As Object
Dim strSch As String
strSch = "http://schemas.microsoft.com/cdo/configuration/"
Set objCDOConfig = CreateObject("CDO.Configuration")
With objCDOConfig.Fields
.Item(strSch & "sendusing") = cdoSendUsingPort
.Item(strSch & "smtpserver") = "mail.optonline.net"
.Item(strSch & "smtpauthenticate") = cdoBasic
.Item(strSch & "sendusername") = "Big Corp"
.Item(strSch & "sendpassword") = "99"
.Update
End With
Set objCDOMessage = CreateObject("CDO.Message")
With objCDOMessage
Set .Configuration = objCDOConfig
.FROM = "Big Corp"
.sender = "(e-mail address removed)"
.TO = "(e-mail address removed)"
.subject = "SALES UPDATE"
.TextBody = "This should be the contents of the text file that is
from the report "
.SEND
End With
Set objCDOMessage = Nothing
Set objCDOConfig = Nothing
Once again I am sorry for the repost,
Thanks
DS