Solved

Set Warnings False to skip a question

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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.
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

820 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