Hi, I am designing a program in VB6, it sends automatically mails to different users, I am using the MAPI controls and Outlook. It works well, but when a new mail is sent, a message appears saying a program is trying to send automatically a mail, and it asks me if I allow the action. The mail is sent until I press "yes". I need to skip this question so that the process be automatic. I tried with the following code without results:
DoCmd.SetWarnings False <== VB doesn't recognize this object, sends an error, is this only an Access function?
SetWarnings False <== VB doesn't recognize this function, sends an error
Application.DisplayAlerts = False <== doesn't work, the message still appearing
I copied the rutine where the mails are being sent.
I will be very grateful with your help. Thanks.
'Application.DisplayAlerts = False
.NewSession = False
.SessionID = Form1.MAPISession1.SessionID
.MsgSubject = "Tasks reminder"
.MsgNoteText = "Project: " + Trim(rst!DescrPrj) + vbCrLf + _
" Meet: " + Trim(rst!DescrMeet) + vbCrLf + _
" Task: " + Trim(rst!DescrTask) + vbCrLf + _
" Date: " + Format(rst!FPFin, "dd/mm/yyyy")
.RecipDisplayName = Trim(rst!Email)