Help...Automate send e-mail code....

G

Guest

I have this code......
Private Sub CommandButton1_Click()

'E-mail
Dim myOutlook As Object
Dim myMailItem As Object
Set myOutlook = CreateObject("Outlook.Application")
Set myMailItem = myOutlook.createitem(0)
myMailItem.Recipients.Add "(e-mail address removed)"
myMailItem.Subject = "ProjectStockEstimate-Suggestions and Problems"
myMailItem.body = TextBox1
myMailItem.send
Set myOutlook = Nothing

End Sub

Now I have tried to insert this to let not go through the security warnings
in outlook with no luck....

..Display
Application.Wait (Now + TimeValue("0:00:02"))
Application.SendKeys "%S"
Can someone help?
 
P

paul.robinson

Hi
You cannot bypass the security warning in Outlook. It is to stop the
automated emailing of viruses.
You can use a library called CDO, which may be listed in your
references. If you at work, your technicians might not allow
installation of this library as it does have security risks.
Google this group or one of the outlook groups on using the CDO
library.
regards
Paul
 
G

Guest

Even when it is only internal mail?

Hi
You cannot bypass the security warning in Outlook. It is to stop the
automated emailing of viruses.
You can use a library called CDO, which may be listed in your
references. If you at work, your technicians might not allow
installation of this library as it does have security risks.
Google this group or one of the outlook groups on using the CDO
library.
regards
Paul
 
G

Guest

This is all good if the program was running only on my PC.But I need it to be
in my VBE code.

Thanx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top