vb123.com

Garry Robinson's Popular MS Access, Office and VB Resource Site

 

Home  Contact Us
Order our Software

RSS & Newsletter  
Join our XML/RSS Newsfeed or sign up for our informative newsletter on Office Automation, Access and VB topics
Read More

Get Good Help
If you need help with a database, our Professionals could be the answer
Read More

  Is Your Database Corrupt ?
If you have a corrupt database, Try our Access Recovery service

The Workbench  Find out who has your database open, start the correct version of Access, easy compacting and backups, change startup options, mde compile,  shutdown database Read and Download

The Toolshed 
Searchable help file comprising of all the information at vb123.com plus hidden downloads etc. Read More



The Toolbox

Libraries of software that we regularly import into our projects. Enhances the Toolshed More..


Upsize to SQL 
Upsize to SQL Server 2005 or 2008 or improve the performance of your Access to SQL Server application
Read More


DryToast New
Backup and query your BaseCamp
® projects
Read More


Datamining/Graphs

Explore your data with this versatile graphing and data mining shareware tool.  Read More

Garry's Blog
Find out a few other things that Garry has been writing about Microsoft Access. Read more

About The Editor 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
Contact Us ...

Search ...

or try our new Expression Web
 vb123.com.au
 

 

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
 

Downloads

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.

  Click here for the download file if you own "The Toolshed"  Else click here   

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
Improving The Performance Of Outlook
Backing Up or Moving Microsoft Outlook
 

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

Notes: Since article was published

 

Links >>>  Home | Search | Workbench | Orders | Newsletter | Access Security | Access professionals