Solved

Set Warnings False to skip a question

Posted on 2008-10-16
5
691 Views
Last Modified: 2008-10-17
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.
'DoCmd.SetWarnings False
'SetWarnings False
'Application.DisplayAlerts = False
 
With Form1.MAPISession1
  .NewSession = False
  .SignOn
End With
 
With Form1.MAPIMessages1
  .SessionID = Form1.MAPISession1.SessionID
  .Compose
  .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)
  .Send False
End With
 
Form1.MAPISession1.SignOff

Open in new window

0
Comment
Question by:aviveros
  • 2
  • 2
5 Comments
 

Expert Comment

by:jsonnenvzla2
ID: 22736788
There is NO way to avoid that, it sucks !!!! Ive been there
0
 
LVL 92

Expert Comment

by:Patrick Matthews
ID: 22737118
Hello aviveros,

That is an Outlook security measure implemened starting in Outlook 2000 SP2, and persisting
at least through 2002 and 2003.

To disable it, I've used three products:

1) Express ClickYes
http://www.contextmagic.com/express-clickyes/
There is a free version and a Pro version for ~$30 with more features.  I've used the pro version.
It works as advertised.  I'm not using it currently.  I'm using the MAPILab product instead.

2) MAPILab Advanced Outlook Security
http://www.mapilab.com/outlook/security/
A free COM add-in for Outlook.  I am using it now and I like it

3) Redemption
http://www.dimastr.com/redemption/
A DLL you can use in your code to disable the warnings.  Free download, but you must pay a
license to distribute.  I've used it and like it.


Regards,

Patrick
0
 

Author Comment

by:aviveros
ID: 22741174
Do some of these options affect directly or indirectly the outlook server?, because we are using a remote outlook server, and we can't install any thing that affects the security, we have a very high level of restrictions and securities (implemented by our corporative), and it is prohibited that we try to install something around these.
0
 
LVL 92

Accepted Solution

by:
Patrick Matthews earned 125 total points
ID: 22741392
aviveros,

My suggestions all operate on the client side...

Regards,

Patrick
0
 

Author Comment

by:aviveros
ID: 22742320
I confirmed with the corporative, unfortunately we can't install any add-in in any server or computer. My unique option was to skip the confirmation only with VB code. I am going to propose other options to the users. Thank you very much, I am going to accept your suggestions as solution, I think all of them work well, but in this case the problem is due to the restrictions I have for installing any software. Thanks.
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes Outlook might have problems sending a message. There may be various causes- corrupted PST, AV scanner etc. The message, instead of going to the Sent Items folder, sits in the Outbox indefinitely. To remove it you can use a free tool cal…
In this step by step procedure, you will come to know the details of creating an Outlook meeting in 2007, 2010, 2013 & 2016.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question