Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Outlook Redemption

156 views
Skip to first unread message

musicloverlch

unread,
Jul 16, 2018, 2:45:31 PM7/16/18
to
Does anyone else use Redemption to send emails from Access thru Outlook? Did Outlook just update over the weekend and break something? It won't attach attachments anymore and I didn't change the syntax. I am using SafeItem.Attachments.Add AttachmentPath to attach things. If that wasn't enough, it gets stuck in drafts and says "Run-time error -2147467259 (80004005) Could not submit the message - error 0x8004005"

I'm panicking. I need these emails to go.

Please help.

Laura

Ron Weiner

unread,
Jul 16, 2018, 9:46:54 PM7/16/18
to
musicloverlch presented the following explanation :
> ---
> This email has been checked for viruses by AVG.
> https://www.avg.com

I do not know how to answer your question directly, as I have never
used the Outlook Client to send email from my Access apps. I have used
and am currently still using CDO to send emails. This has proved to be
a simple robust way to send millions (yes I literally mean millions of
emails over the last decade or two) of emails with a minimum of fuss
and muss.

Here is the code that I wrote in the early 2000's which is the core of
the code that i still use.

Public Sub testCDO()
' Purpose Demondtrate Sending an Email with an attachment using CDO
(Collaboration Data Objects)
' Uses Late Binding - Does not need a reference to the
Microsoft CDO For Windows library
' cdosys comes installed as standard on Windows 2K and higher
workstations and servers
' This code will fail on NT4, Win 98, and Win 95 where the
cdosys.dll is not present
' Author Ron Weiner rwe...@WorksRite.com
' Copyright © 2001-2005 WorksRite Software Solutions
' You may use this code example for any purpose what-so-ever
with
' acknowledgement. However, you may not publish the code
without
' the express, written permission of the author.
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") = "SMTP.ServerName.Com"
' Only used if SMTP server requires Authentication
.Item(strSch & "smtpauthenticate") = cdoBasic
.Item(strSch & "sendusername") = "SomeM...@SomeDomain.com"
.Item(strSch & "sendpassword") = "YourPassword"
.Update
End With

Set objCDOMessage = CreateObject("CDO.Message")
With objCDOMessage
Set .Configuration = objCDOConfig
.from = "Senders Pretty Name"
.sender = "SomeM...@SomeDomain.com"
.To = "Som...@SomeWhere.com"
.Subject = "Sample CDO Message"
' Use TextBody to send Email in Plain Text Format
'.TextBody = "This is a test for CDO message"
' Use HTMLBody to send Email in Rich Text (HTML) Format
.HTMLBody = "Test CDO Rich Text this is not Bold But <B>This
is!</B>"
' Adding Attachments is easy enough
.AddAttachment "c:\SomeFile.zip"
.AddAttachment "c:\SomeOtherFile.pdf"
' Un-Rem next line to get "Return Reciept Request"
'.MDNRequested = True
.Send
End With
Set objCDOMessage = Nothing
Set objCDOConfig = Nothing
End Sub

Perhaps you will find it useful. If nothing else it will remove the
reliance on Outlook to get your emails sent.

Good luck with your project.

Rdub

musicloverlch

unread,
Jul 26, 2018, 11:55:54 PM7/26/18
to
Thanks so much!
0 new messages