I am trying to send an email using Excel with this code:
Sub SEND_EMAIL()
Dim olApp As Outlook.Application
Set olApp = CreateObject("Outlook.Application")
Dim olMail As Outlook.MailItem
Set olMail = olApp.CreateItem(olMailItem)
' ADRESSE
olMail.To = "selojo7915@rippb.com"
' Subject
olMail.subject = "Line"
' BODY
olMail.body = "this"
olMail.Send
When starting this macro i have the following error
The error is in the last line (olMail.Send)
And every time i am trying to send an email outlook is starting to update and after a moment it's showing error
Exception de HRESULT: 0x80004004 (E_ABORT)
You see a security issue (earlier prompts) because Outlook is configured on the client computer in one of the following ways:
You can create a group policy to prevent security prompts from displaying if any up-to-date antivirus software is installed on the system or just turn these warning off (which is not really recommended).
Read more about that in the Security Behavior of the Outlook Object Model article.
You may consider using the following workarounds:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.