Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to use Item.Send without the new message of Outlook 2000 ? 1

Status
Not open for further replies.

JRodrigues

Programmer
Mar 12, 2002
4
PT
Alo,

with Outlook 98, i use the code below and it work's fine...,but with Outlook 2000 , i got the message box, "A program is trying to automatically send e-mail on your behalf.". Is this setup by a security policie ?? Can it be turn off ??? Can i go around it without using a "sendkeys routine" ??!??

The code:

Public Sub MAILME(FILA1 As String, FILA2 As String)
Dim OL As Object
Dim MailSendItem As Object
Dim strToEmail As String
Dim strAttachment1 As String
Dim stmsg As String
Set OL = CreateObject("Outlook.Application")
Set MailSendItem = OL.CreateItem(0)
strToEmail = "jcsrodrigues@clix.pt"
'strAttachment1 = "X:\" + LTrim(RTrim(FILA1)) + ".xls"
With MailSendItem
.Subject = FILA1
.to = strToEmail
stmsg = "Data: " + CStr(Date) + " Hora: " + CStr(Time) + Chr(10) + FILA2
.Body = stmsg
'.Attachments.Add strAttachment1
.NoAging = False 'ensures a response is returned to you if not opened
.Send
Set OL = Nothing
End With
End Sub



TIA

J.RODRIGUES
 
mmmm i cant think of anything in outlook that would create that message, ive gone through all the sercurity settings trying to generate your error but i cant ! are there any add in's or coms running with the outlook you are using ? you could possible unload these in code when your code runs


 
I've had the same problem.

I came across something that said the security settings for Outlook had to be changed by the administrator. I haven't been able to get any specific information as of yet... However, I'm not running in add-ins , etc.

Evidently, it has something to do with the new security settings in Outlook.
 
Thank you all...

jocrews... i'd suspected that...i'll ask my exchange administrator, but i know the answer in advance...:-(
Thanks any way.

J.Rodrigues

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top