J
Jason
I am using the following code to email users within my company their cell
phone details. This code is part of a loop that will email to 300+ users.
My problem is that outlook prompts me for each email with the following
message:
"A program is trying to send email on your behalf. Would you like to
continue?"
Is there a way to disable or prevent this message from showing to eliminate
300+ mouse clicks?
Much appreciated.
Jason
'email
Dim myOutlok As Object
Dim myMailItm As Object
Set otlApp = CreateObject("Outlook.Application")
Set otlNewMail = otlApp.CreateItem(olMailItem)
fName = ActiveWorkbook.Path & "\" & ActiveWorkbook.Name
With otlNewMail
.To = Workbooks(wb_name).Sheets(ws_name).Range("AA" &
phone_row).Value
.CC = Workbooks(wb_name).Sheets(ws_name).Range("AA" &
phone_row).Value
.Subject = "Monthly Cell Phone Bill"
.Body = "Monthly Cell Phone Bill"
.Attachments.Add fName
.Send
End With
phone details. This code is part of a loop that will email to 300+ users.
My problem is that outlook prompts me for each email with the following
message:
"A program is trying to send email on your behalf. Would you like to
continue?"
Is there a way to disable or prevent this message from showing to eliminate
300+ mouse clicks?
Much appreciated.
Jason
Dim myOutlok As Object
Dim myMailItm As Object
Set otlApp = CreateObject("Outlook.Application")
Set otlNewMail = otlApp.CreateItem(olMailItem)
fName = ActiveWorkbook.Path & "\" & ActiveWorkbook.Name
With otlNewMail
.To = Workbooks(wb_name).Sheets(ws_name).Range("AA" &
phone_row).Value
.CC = Workbooks(wb_name).Sheets(ws_name).Range("AA" &
phone_row).Value
.Subject = "Monthly Cell Phone Bill"
.Body = "Monthly Cell Phone Bill"
.Attachments.Add fName
.Send
End With