Solved

Set Warnings False to skip a question

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Use email signature images to promote corporate certifications and industry awards.
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…
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…
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: …

708 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

16 Experts available now in Live!

Get 1:1 Help Now