Email Excel as Attachment Question

  • Thread starter Thread starter andy
  • Start date Start date
A

andy

I have an Excel form on our Intranet, and have coded a
command button using the following method

Private Sub btnSubmitForm_Click()
ActiveWorkbook.SendMail ("(e-mail address removed)")
End Sub

which works well, however, a MS Outlook dialog box is
evoked which displays the following "A program is trying
to automatically send e-mail on your behalf. Do you want
to allow this?..." and Yes/No/Help command buttons are
displayed.

How can I bypass this dialog box so that the user doesn't
need to click yes. Can this be turned off, or the answer
be programatically set to "Yes"???

Thank you in advance for your help
God bless you
 
Or if you want....after creating your email, instead of using *.Send
use *.Display* to briefly display the email to the screen and then us
SEND-KEYS to send a *S* keystroke to the application. The applicatio
will think that you have physically pressed the send button on th
email form bypassing the security prompt altogether. The only downsid
to this method is that the email is displayed for a split second on th
screen before being sent.

Express clickYES is also a very good free tool to help you overcom
this problem. Just look in the link that Ron provided above to fin
where to download it.



Rolli
 
Hi Rollin

I don't like SEND-KEYS
(not reliable)

Don't use it if you have other choices
 
Back
Top