Hi!
I'm getting a pop up in outlook when I run vba code in excel.
"A program is trying to access email address ifnformation stored in outlook. If this is unexpected, click deny and verify your antivirus software is up to date..." it has me allow, deny, or allow access of X minutes. If I click allow, it happens every time I run the macro. Is there something I need to change to fix this?
Snippet of my code is below:
I'm getting a pop up in outlook when I run vba code in excel.
"A program is trying to access email address ifnformation stored in outlook. If this is unexpected, click deny and verify your antivirus software is up to date..." it has me allow, deny, or allow access of X minutes. If I click allow, it happens every time I run the macro. Is there something I need to change to fix this?
Snippet of my code is below:
VBA Code:
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
strbody = "<BODY style=font-size:11pt;font-family:Calibri>Hi " & FirstNameArray & "," & vbNewLine & _
"<br><BR>Thanks,</BODY>" & _
""
'On Error Resume Next
With OutMail
.To = EmailArray
.cc = ""
.Subject = "Description"
.HTMLBody = strbody & "<br>" & .HTMLBody
.Display
'.send
'.Attachments.Add source_file
End With
'Next
'On Error GoTo 0
Set OutMail = Nothing
cleanup:
Set OutApp = Nothing
Application.DisplayAlerts = False
Application.DisplayAlerts = True
With Application
.EnableEvents = True
.ScreenUpdating = True
End With
End Sub