Hi,
I have built something similar to this, but encountered problems when trying to send out 100's of emails. It just stopped sending sometime for no apparent reason.
Also the docm.sendobject tries to open outlook, which can be a pain with outlook security also.
This uses smtp to route the mail out.
Also see another forum called
and do a search on cdo email. There's a good thread going on there aboiut it!
Look at the below code.
-------------------------------
Public Function StockEmail_(StockEmail)
Dim mail
Dim strSQL As String
Dim strSubject As String
Dim Attach
Dim strEmail As String
Set mail = Nothing
strEmail = DLookup("LPContactEmail", "setup"
' Send by connecting to port 25 of the SMTP server.
Dim iMsg
Dim iConf
Dim Flds
Const cdoSendUsingPort = 2
Set iMsg = CreateObject("CDO.Message"

Set iConf = CreateObject("CDO.Configuration"
Set Flds = iConf.Fields
' Set the CDOSYS configuration fields to use port 25 on the SMTP server.
With Flds
.Item("
= 2 'cdoSendUsingPort
'ToDo: Enter name or IP address of remote SMTP server.
.Item("
= "zebidee"
.Item("
= 10
.Update
End With
' Apply the settings to the message.
With iMsg
Set .Configuration = iConf
.To = strEmail 'ToDo: Enter a valid email address.
.from = "emailaddess@email.com" 'ToDo: Enter a valid email address.
.Subject = "Your subject goes here! "
.textbody = "Your Body Goes here!"
Set Attach = iMsg.AddAttachment("you can also add an attachment!"

.Send
End With
' Clean up variables.
Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing
End Function
-------------------------------------
hth
brendan