Hi All,
I am using the following code to send emails from VBA. However, where I
do so, an outlook box opens up saying "A program is trying to
automatically send email on your behalf. Do you want to allow this?"
After this unless the user clicks on "Yes" button the email is not
sent.
ActiveWorkbook.EnvelopeVisible = True
Worksheets("Template").Activate
With ActiveSheet.MailEnvelope
.Item.To = "a@b.com"
.Item.Cc = emailadd
.Item.Subject = "Appraisal Form for " & TextBox5.Value
.Item.Send
End With
Is there a way to skip this step as I need to code a macro which
identifies deviations in a continous loop and sends emails as and when
it finds some deviations.
I also wanna avoid using send keys as this is not the best option here.
Thanks in advance,
Yash
I am using the following code to send emails from VBA. However, where I
do so, an outlook box opens up saying "A program is trying to
automatically send email on your behalf. Do you want to allow this?"
After this unless the user clicks on "Yes" button the email is not
sent.
ActiveWorkbook.EnvelopeVisible = True
Worksheets("Template").Activate
With ActiveSheet.MailEnvelope
.Item.To = "a@b.com"
.Item.Cc = emailadd
.Item.Subject = "Appraisal Form for " & TextBox5.Value
.Item.Send
End With
Is there a way to skip this step as I need to code a macro which
identifies deviations in a continous loop and sends emails as and when
it finds some deviations.
I also wanna avoid using send keys as this is not the best option here.
Thanks in advance,
Yash