G
Guest
I have been sending Excel work books to outlook mail recepients using VBA.
The code is written in the Excel VBA Editor as follows:
Dim oMSOutlook As Object
Dim oEmail As Object
Set oMSOutlook = CreateObject("Outlook.Application")
Set oEmail = oMSOutlook.CreateItem(olMailItem)
With oEmail
.Attachments.Add (ActiveWorkbook.FullName)
.To = "(e-mail address removed)"
.Send
End With
Question:
When I run the following code outlook generate a message saying
" A programm is trying to send mails automatically . Do you want to allow
this?"
How to avoid this message. since there are more than 50 mails and have to
press
"Yes" for all these mails.
pls help
- Zulfi
The code is written in the Excel VBA Editor as follows:
Dim oMSOutlook As Object
Dim oEmail As Object
Set oMSOutlook = CreateObject("Outlook.Application")
Set oEmail = oMSOutlook.CreateItem(olMailItem)
With oEmail
.Attachments.Add (ActiveWorkbook.FullName)
.To = "(e-mail address removed)"
.Send
End With
Question:
When I run the following code outlook generate a message saying
" A programm is trying to send mails automatically . Do you want to allow
this?"
How to avoid this message. since there are more than 50 mails and have to
press
"Yes" for all these mails.
pls help
- Zulfi