From memory, the version of ClickYes I used, which was free at the time, still had to wait for the Yes button to become active before it could automatically press yes, so it wasn't good for sending bulk emails. This may have changed in recent releases.
That is supposed to be the case with Yes/No but Yes/No/Pro just bypasses and goes srtraight through.
I have SMTP doing about all I can do with Outlook including putting formatted contents of Word in the body but I can't get it to show in the Send box whereas that is not a problem with Outlook.
I find SMTP more reliable than Outlook. Outlook seems to leave stuff in the Outbox at different times, although most they clear if you open Outlook but not veryone uses Outlook as their Default. I don't as I prefer Outlook Express and Windows Mail.
It all has its moments![]()
I tried the ClickYes Pro and it worked to send the first email without the security warning but then it would not go to the next record and send the next email. It just stops after the first email.
Any thoughts?
Public Sub SendMessage(strTo, strSubject, STRBodyMessage As String, Optional AttachmentPath, Optional BCC, Optional strBCC)
'*********************************************************
'* Send an email message with optional attachment *
'* using Outlook Automation. *
'* requires selection of the MS Outlook object reference *
'*********************************************************
Dim objOutlook As Outlook.Application
Dim objOutlookMsg As Outlook.MailItem
Dim objOutlookRecip As Outlook.Recipient
Dim objOutlookAttach As Outlook.Attachment
'Create the Outlook session
Set objOutlook = CreateObject("Outlook.Application")
'Create the message
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)
With objOutlookMsg
'Add the To recipient(s) to the message
Set objOutlookRecip = .Recipients.Add(strTo)
objOutlookRecip.Type = olTo
'Add the CC recipient(s) to the message (enable code if required)
'Set objOutlookRecip = .Recipients.Add(strCc)
'objOutlookRecip.Type = olCC
'Add the BCC recipient(s) to the message (enable code if required)
'Set objOutlookRecip = .Recipients.Add(strBcc)
'objOutlookRecip.Type = olBCC
'Set the Subject, Body and Importance of the message
.Subject = strSubject
.Body = STRBodyMessage
.Importance = olImportanceNormal
'Add attachments to the message.
If Not IsMissing(AttachmentPath) Then
Set objOutlookAttach = .Attachments.Add(AttachmentPath)
End If
'Resolve each recipients name, for use with Outlook address book
For Each objOutlookRecip In .Recipients
objOutlookRecip.Resolve
If Not objOutlookRecip.Resolve Then
objOutlookMsg.Display
End If
Next
.Send
End With
Set objOutlookMsg = Nothing
Set objOutlook = Nothing
End Sub
Using automation, via the Oulook object, doesn't raise the warning (at least, not in my setup), whereas it did with SendObject.
I need ClickYes with code but perhaps that is because I am opening Word and having the content/format of the Word doc go in the email body.