A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
what is the dll file name you have registered?
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi, I have to automate emails in Outlook Via SMTP using EasyMail.
I am using Win 10, Office 365, 64 Bit version.
I specified some Email Address in Sheet 1 and and I need to automate Sheet 2 as a attachement in Excel to Outlook.
I wrote the code in Excel VBA to automate Emails for Outlook.
If it is without SMTP, It is working perfectly. When I create the object for Easy Mail (Set SMTP = CreateObject("EasyMailCtrl.EasyMailCtrl.1") , and when I run the code, it is coming error as "Runtime Error 429 ActiveX Component Can't create Object". I selected the references as well in VBA for EasyMail SMTP Library,r Active X Data Object, Microsoft Outlook etc.
I can create the objects for others but not for EasyMail. I fallowed this link (https://www.componentsource.com/product/easymail-objects-smtp) but no luck.
I have installed DLL file and I can confirm that I have DLL File registered. But not sure why it is not supporting.
Sub EmailSheet()
Dim LastRow As Long
Dim LastEmailRow As Long
Dim CurrentEmailRow As Long
Dim WeekNum As Integer
Dim DateAndTime As String
Dim fw As Integer
Dim filepath As String
Dim CurrentItem As Object
Dim Sender As Outlook.AddressEntry
Dim WB As Workbook
Dim WBNew As Workbook
Dim WS As Worksheet
Dim WSNew As Worksheet
Dim WSEmail As Worksheet
Dim ccmail As String
Dim tomail As String
Dim OutlookApp As Outlook.Application
Dim OutlookMail As Outlook.MailItem
Dim SMTP As Object
Dim objExcel As Object
Dim Result&
'Set objExcel = CreateObject("Excel.Application")
Set SMTP = CreateObject("EasyMailCtrl.EasyMailCtrl.1") ( I am getting error here)
'Set SMTP = CreateObject("EasyMail.SMTP")
SMTP.MailServer = "smtp.gb.test.net"
'SMTP.FromAddr = "******@test.com"
'SMTP.AddRecipient("", "******@test.com",1)
Application.ScreenUpdating = False
WeekNum = CInt(Format(Date, "ww", fw))
DateAndTime = Format(Now(), "dd_mmm_yy" & "-" & "hh_mm")
Set OutlookApp = New Outlook.Application
Set OutlookMail = OutlookApp.CreateItem(olMailItem)
'Set SMTP = CreateObject("EasyMailCtrl.EasyMailCtrl.1")
'SMTP.MailServer = "smtp.gb.test.net"
Set WB = ActiveWorkbook
Set WS = ActiveSheet
If ActiveSheet.AutoFilterMode = True Then
ActiveSheet.AutoFilterMode = False
End If
Workbooks.Add
Set WBNew = ActiveWorkbook
ThisWorkbook.Activate
WS.Copy before:=WBNew.Sheets(1)
WBNew.Activate
LastRow = Range("A500").End(xlUp).Row
Range(Cells(LastRow - 8, 1), Cells(LastRow, 15)).Clear
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:="*********************************** & ".xlsx"
WBNew.Save
filepath = WBNew.FullName
WB.Activate
Sheet2.Activate
Set WSEmail = ActiveSheet
LastEmailRow = Range("B2").End(xlDown).Row
Call ModProgress.Initprogressbar
For CurrentEmailRow = 2 To LastEmailRow
Range("B" & CurrentEmailRow).Select
'-------------------- start here
'subj = " This is test mail please ignore it" & "-" & s
subj = Range("E4").Value
bodymsg = Range("E10").Value
'tomail = Application.VLookup(i, Sheets("Supplier Email").Columns("A:Z"), 4, 0)
tomail = ActiveCell.Value
'ccmail = Application.VLookup(i, Sheets("Supplier Email").Columns("A:Z"), 5, 0)
ccmail = ActiveCell.Offset(0, 1).Value
'If cmail = "" Then
If tomail <> "" Or ccmail <> "" Then
With SMTP.OutlookMail
.BodyFormat = olFormatHTML
.Display
.HTMLBody = bodymsg
'last .HTMLBody includes signature from the outlook.
'<br> includes line breaks b/w two lines
.To = tomail
.CC = ccmail
'.BCC = "******@test.com"
.Subject = subj
.Attachments.Add WBNew.FullName
.Send
End With
Else
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
what is the dll file name you have registered?
Thanks Jegan,
I did some troubleshoot but error still appearing.
In one of the very old website it indicates to https://forum.winehq.org/viewtopic.php?t=9485 winetricks wsh56. I am not sure what it is.
and also it appears like vulnerability,. http://fortiguardcenter.com/encyclopedia/ips/17881
As I am dev but don't have admin rights. we have the EasyMail License as well. I am still struggling for it to fix it
Hi Vidish
You can try some general troubleshooting steps for the Runtime 429 error:
Thanks Jegan for your prompt response.
But it is working in Gupta SQL base and it is not in VBA.
I am not sure how it is working in Gupta but not in VBA.
Thanks for the DLL link. I can also confirm that DLL is installed properly.
Any more suggestions please?
Hi Vidish
EasyMail object is not compatible for Windows 10 64 bit.
https://www.componentsource.com/product/easymai...
You also check the DLL is supported based on this link
https://docs.microsoft.com/en-us/previous-versi...
Note: This (first one) is a non-Microsoft website. The page appears to be providing accurate, safe information. Watch out for ads on the site that may advertise products frequently classified as a PUP (Potentially Unwanted Products). Thoroughly research any product advertised on the site before you decide to download and install it.