Next Tip  Turning Off Outlook Warning Messages

Stop Those Annoying Outlook Warning Messages

One of the more annoying things to cope with when programming for Microsoft Outlook is the security messages that pop up to stop the boring email spammers. The ones that you may be familiar with are

"A program is trying to automatically trying to send e-mail messages on your behalf. Do you want to allow this?"

or "A program is trying to automatically access email address that you have stored in Outlook. Do you want to allow this?"

There are a few programming options on the market to solve this but none are quite as easy to implement as this program which initially doesn't require any programming and doesn't require any cash either.
http://www.contextmagic.com/express-clickyes/

Key features of this program is that it doesn't need to be turned on when it starts, it can be turned on in vba code if necessary and it only consumes a small amount of memory.

It sits in your task bar and looks like this

Security Note: Turning off Outlook warning messages leaves you vulnerable to the very things it is trying to protect against. ie. Exposing yourself to a script virus which can run at the same time as the warnings are off. So if you are happy with the solution, use VBA code to ensure that Click Yes is suspended most of the time.

Comment from a newsletter reader:  I've been using ClickYes since it was published, but never thought of switching it off and on. (many thanks)  Nic

VBA Code

The Code that will start and suspend this program looks as follows. In this case the program is resumed when the form is opened and disabled when the form is closed.

Option Compare Database
Option Explicit

' Declare Windows' API functions
Private Declare Function RegisterWindowMessage _
Lib "user32" Alias "RegisterWindowMessageA" _
(ByVal lpString As String) As Long

Private Declare Function FindWindow Lib "user32" _
Alias "FindWindowA" (ByVal lpClassName As Any, _
ByVal lpWindowName As Any) As Long

Private Declare Function SendMessage Lib "user32" _
Alias "SendMessageA" (ByVal hwnd As Long, _
ByVal wMsg As Long, ByVal wParam As Long, _
lParam As Any) As Long



Private Sub Form_Load()
Dim wnd As Long
Dim uClickYes As Long
Dim Res As Long

' Register a message to send
uClickYes = RegisterWindowMessage("CLICKYES_SUSPEND_RESUME")

' Find ClickYes Window by classname
wnd = FindWindow("EXCLICKYES_WND", 0&)

' Send the message to Resume ClickYes
Res = SendMessage(wnd, uClickYes, 1, 0)

End Sub

Private Sub Form_Unload(Cancel As Integer)
Dim wnd As Long
Dim uClickYes As Long
Dim Res As Long

' Register a message to send
uClickYes = RegisterWindowMessage("CLICKYES_SUSPEND_RESUME")

' Find ClickYes Window by classname
wnd = FindWindow("EXCLICKYES_WND", 0&)


' Send the message to Suspend ClickYes
Res = SendMessage(wnd, uClickYes, 0, 0)

End Sub
 

  Your Sample Database Is Called   "clickYes2000.zip"

Sample database is suited to all versions of Access, The download file contains the code above in a simple form that resumes ClickYes when the database opens and suspends it when the database closes.

If you do NOT own "The Toolbox", Click here to find out how to purchase The Toolbox.

 


Author Bio.

Garry Robinson runs GR-FX Pty Limited, a company based in Sydney, Australia. If you want to keep up to date with the his latest postings on Access Issues,  visit his companies popular web site at  http://www.vb123.com/  or sign up for his Access email newsletter by heading to http://www.vb123.com/  The web site features many Access resource sand software  that are used by  more than 10,000 readers a month. To find out about Garry’s book which is called “Real World Microsoft Access Database Protection and Security”, point your browser to http://www.vb123.com/map/. You can find Garry’s contact details at  … www.gr-fx.com

Note: Another less known way to get around Outlook warning messages which I have used for a long time with this newsletter is to send use html mail when doing mail merge from Access. For some reason, Outlook only stops text emails and leaves html email messages alone.

Other Pages On This Site You Might Like To Read

Taking Outlook and XML to Task in MS Access
Processing E-Mail Orders using Outlook and Access
Personalised Email from Access and Word
 

Click on the following button Next Tip to jump to the next page in the document loop.


 

Our Tools and Resources

  • RSS & Newsletter Here
    Join our newsfeed or sign up for our informative newsletter on Office Automation, Access and VB topics

  • Smart Access is online 
    The best magazine written about Microsoft Access is now being transferred to the web. There are 400 articles written by a 100 authors in the collection. 

    See the Smart Access 2010 specials here

  • The Workbench
    Find out who has your database open, start the correct version of Access, easy compacting and backups, change startup options, creation versions,  shutdown database

  • Read about the Toolbox
    Sample downloads, library resource kit and searchable help file comprising most of the information at vb123.com.au plus hidden downloads etc.

  • Convert Access to SQL Server  
    Upsize to SQL Server 2005 or 2008, easily repeated conversions, highly accurate SQL query  translation and web form conversion.

 

 

vb123 Professionals


Get Good Help Here

If you need help with a database or Office programming, our Professionals could be the answer because we have worked on many similar solutions



Frontpage Conversions
We have converted vb123.com to Expression Web, contact us if we can help you move to the latest Microsoft web tool.


About The Editor ~ Contact Us
Garry Robinson writes for a number of popular computer magazines, is now a book author and has worked on 100+ Access databases. He is based in Sydney, Australia

Access 2003 Security

MS Access Security

Read More here