Solved

Set Warnings False to skip a question

Posted on 2008-10-16
5
690 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

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

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

If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
MS Outlook is a world-class email client application that is mainly used for e-communication globally.  In this article, we will discuss the basic idea about MS Outlook, its advanced features, and types of MS Outlook File formats.
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…
Many of my clients call in with monstrous Gmail overloading issues with Outlook. A quick tip is to turn off the All Mail and Important folders from synching. Here is a quick video I made to show you how to turn off these and other folders in Gmail s…

910 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now