[Outlook] how to avoid the "Email Security Update" Warning box

Source: Internet
Author: User
Tags microsoft outlook
How can I avoid the "Email Security Update" Warning box?

Prepared by: zheng yu (please note when reprinting)

After the "Email Security Update" patch is installed in various versions of outlook, a warning box is displayed whenever we access certain fields. Except Outlook 2003, Outlook 2003 does not display a warning box when you access the following three types of applications:

? VBScript code in published, non-oneoff outlook forms

? Outlook VBA code that uses the intrinsic Application Object

? Outlook COM add-ins properly constructed to derive all objects from the application object passed by the onconnection event

In many operations on outlook events, we need to access sensitive fields. We can avoid the warning box as follows:

Create a temporary VBScript file on the local hard disk. Start a wscript. EXE engine and run the prepared VBScript. It constantly detects the currently activated window. If the warning box appears, select the "A" and "Y" Buttons using sendkeys to allow access to sensitive fields within one minute. In this way, although the warning box will still pop up, the user will hardly notice it and will not increase the operation complexity of the user.

The warning box in Outlook XP does not set the y hotkey for the "yes" button. Therefore, we must send two tabs and one enter key message again to close the warning box.

The content of the running VBScript is as follows:

Set FSO = Createobject ("wscript. Shell ")

While FSO. appactivate ("Microsoft Outlook") = false

Wscript. Sleep 50

Wend

FSO. sendkeys "A", true

FSO. sendkeys "Y", true

FSO. sendkeys "{tab} {enter}", true

 

 

In the "g_oapplication_itemsend" and "g_onewmailsms_click" events, we do this:

First, check the outlook version. If it is earlier than Version 2003, call the scripting. FileSystemObject object to create a file named "Bypass. vbs", which is in the current path of the outlook application by default. The file content is the content of the VBScript above. We don't need to worry about Outlook 2003.

Second, call

Set wshshell = Createobject ("wscript. Shell ")

Wshshell. Run ("wscript.exe bypass. vbs // B ")

To run the script.

Finally, delete the script when the event is completed.

 

Writen by zhengyun. nojunk (AT) gmail.com

Appendix:

On Error resume next
Dim stroutlookversion as string
Dim FSO, wshshell
Set FSO = Createobject ("scripting. FileSystemObject ")
Dim strfilenameofbypass as string 'vbscript script file name
Strfilenameofbypass = "outlookemailsecurityupdatebypass. vbs"

Stroutlookversion = g_oapplication.version
Dim arraysplit
Arraysplit = Split (stroutlookversion ,".")
Stroutlookversion = arraysplit (0)
'Check the outlook version:
Dim fsofile
If CINT (stroutlookversion)
'Create a VBScript file first
Set fsofile = FSO. createtextfile (strfilenameofbypass)
Fsofile. writeline "set FSO = Createobject (" "wscript. Shell "")"
Fsofile. writeline "while FSO. appactivate (" "Microsoft Outlook" ") = false"
Fsofile. writeline "wscript. Sleep 50"
Fsofile. writeline "Wend"

If CINT (stroutlookversion) = 9 then
'Outlook2000 has a shortcut key setting on the default button, so you can launch the and Y keys:
Fsofile. writeline "FSO. sendkeys" "A" ", true"
Fsofile. writeline "FSO. sendkeys" "Y" ", true"
End if

If CINT (stroutlookversion) = 10 then
'
'On outlookxp, the "yes" button in the warning box does not set the y hotkey.
'It is useless for us to send the y key, so we will continue to send two tabs and one carriage return.
'Can also be used to close the warning box
Fsofile. writeline "FSO. sendkeys" "A" ", true"
Fsofile. writeline "FSO. sendkeys" "{tab} {enter}" ", true"
End if

Fsofile. Close

'Then run it:
If FSO. fileexists (strfilenameofbypass) then
Set wshshell = Createobject ("wscript. Shell ")
Wshshell. Run ("wscript.exe" & strfilenameofbypass & "// B") '// B indicates that no error dialog box is displayed.
End if
End if
On Error goto 0

Trackback: http://tb.blog.csdn.net/TrackBack.aspx? Postid = 33826

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.