ajayambekar1151
New Member
- Joined
- Jul 20, 2019
- Messages
- 1
Hi, looking for some help. A macro is written in Excel VBA to send email through Outlook. I am getting an error, A program is trying to send email on your behalf. Please note that this macro will run on multiple systems where Outlook 365 is installed. In outlook 365, there are restrictions to do any changes in Outlook Trust Center settings also can't change anything in Windows registry. Please help. I am using below code.
Sub send_email()
application.displayalerts = false
dim outapp as object
Dim outmail as object
Set outapp = createobject("outlook.application")
with outmail
.To = ""
.cc = ""
.body ""
.send
End with
Set outmail = nothing
Set outapp = nothing
Application.displayalerts = True
end sub
Sub send_email()
application.displayalerts = false
dim outapp as object
Dim outmail as object
Set outapp = createobject("outlook.application")
with outmail
.To = ""
.cc = ""
.body ""
.send
End with
Set outmail = nothing
Set outapp = nothing
Application.displayalerts = True
end sub