September 22, 2008 at 2:44 am
Hi Vic
I went in and tried again this morning on the XP machines. Low and behold it worked. I didn't change any code. I always find this sort of problem the most frustrating...
I'm going to leave it to try - until I get some phonecalls. I'm not sure I need the Office 12 / 2007 converter as all the machines are running 2003 Access? All the other applications are 2007.
Hi William
Many thanks for your offer of sending me the code. That would be great. I'm happy to send my email address if that's how it is done? I also had the problem with SendObject. One minute it worked - the next it didn't. Which is too close for comfort to my current position.
Many thanks
Paul
September 23, 2008 at 5:51 am
Here is the original article that describes a method to send email from Access without referencing the Outlook library, it uses the Collaboration Data Objects CDO 1.21 library...
SendObject method fails in Access 2000
September 24, 2008 at 4:05 am
Hi William
That's great. I very much appreciate your help and support.
Many thanks
Paul
November 3, 2008 at 5:06 am
Try this to send email without having to automate outlook.
Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
strSchema = "http://schemas.microsoft.com/cdo/configuration/"
Flds.Item(strSchema & "sendusing") = 2
Flds.Item(strSchema & "smtpserver") = "smtp.yourdomain.com"
Flds.Item(strSchema & "smtpserverport") = 465 'needed if using SSL
Flds.Item(strSchema & "smtpauthenticate") = 1 'needed if using SSL
Flds.Item(strSchema & "sendusername") = strAccount
Flds.Item(strSchema & "sendpassword") = strPassword
Flds.Item(strSchema & "smtpusessl") = 1
Flds.Update
With iMsg
.To = strEmailAddress
If strEmailCC <> "" Then
.cc = strEmailCC
End If
.From = "youraccount@yourdomain.com"
.Subject = strEmailSubject
.HTMLBody = strEmailMessage
.Sender = "youraccount@yourdomain.com"
.Organization = "NHS"
.ReplyTo = "youraccount@yourdomain.com"
'possible loop here to add multiple attachments?
.AddAttachment = strFilename
Set .Configuration = iConf
.send
End With
Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing
November 4, 2008 at 3:21 am
Hi Danbarua
Many thanks for sending this. It looks very good. Email is working fine at the moment, but I'll give this a try and see if I can make it work.
Best wishes
Paul
Viewing 5 posts - 16 through 19 (of 19 total)
You must be logged in to reply to this topic. Login to reply