?
Solved

Set Warnings False to skip a question

Posted on 2008-10-16
5
Medium Priority
?
696 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 

Expert Comment

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

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 93

Accepted Solution

by:
Patrick Matthews earned 500 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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
In this article I discuss my selections of the Top Four free Outlook OST File Viewers available. Open, view and read even damaged OST files by using these tools. They all provide a clear preview of all data such as emails, notes, tasks, calendars, e…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
Suggested Courses

800 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