M
Michael fuerst
Users on our network use either Outlook 2000, 2002, 2003
I have VBscript code (see below) in a custom form (developed in
Outlook 2002) in order to suppress the security prompt when reading an
email address. The code is based on the article, "Reinforcing
Dialog-Based Security", referenced on the web page
http://www.slipstick.com/outlook/esecup.htm#autosec
The code suppresses the security prompt correctly for users of Outlook
2000 and 2002. For users of Outlook 2003, the code has no effect,
and the user must process the security prompt. Any ideas?
***** The VBscript code
' Create the bypass file, the lines of which are in arr
arr = Array( _
"Set fso=CreateObject(""WScript.Shell"")", _
"While fso.AppActivate(""Microsoft Outlook"")=FALSE", _
" wscript.sleep 1000", _
"Wend", _
"fso.SendKeys ""a"",True", _
"fso.SendKeys ""{TAB}{TAB}"",True", _
"fso.SendKeys ""{Enter}"",True", _
"Set fso=Nothing" _
)
Set fso = CreateObject("Scripting.FilesystemObject")
Set fsofile = fso.CreateTextFile("bypass.vbs")
For i = Lbound(arr) to Ubound(arr)
fsofile.WriteLine arr(i)
Next
fsofile.Close
' Open Scripting shell and Run bypass file
Set wshShell = CreateObject("Wscript.Shell")
wshShell.Run("bypass.vbs")
' open outlook instance which, if above if stmt ran,
' will be intercepted by script shell running bypass file
Set oapp = CreateObject("Outlook.Application")
' this net line triggers the confirmation screen
Set obj = oapp.GetNamespace("MAPI")
' This is the line of code which generates the security prompt
' which in 2000 and 2002 is successfully suppressed, but in
' 2003 is not.
user = obj.CurrentUser
' close script object running bypass file
Set obj=Nothing
Set oapp = Nothing
Set wshShell=Nothing
I have VBscript code (see below) in a custom form (developed in
Outlook 2002) in order to suppress the security prompt when reading an
email address. The code is based on the article, "Reinforcing
Dialog-Based Security", referenced on the web page
http://www.slipstick.com/outlook/esecup.htm#autosec
The code suppresses the security prompt correctly for users of Outlook
2000 and 2002. For users of Outlook 2003, the code has no effect,
and the user must process the security prompt. Any ideas?
***** The VBscript code
' Create the bypass file, the lines of which are in arr
arr = Array( _
"Set fso=CreateObject(""WScript.Shell"")", _
"While fso.AppActivate(""Microsoft Outlook"")=FALSE", _
" wscript.sleep 1000", _
"Wend", _
"fso.SendKeys ""a"",True", _
"fso.SendKeys ""{TAB}{TAB}"",True", _
"fso.SendKeys ""{Enter}"",True", _
"Set fso=Nothing" _
)
Set fso = CreateObject("Scripting.FilesystemObject")
Set fsofile = fso.CreateTextFile("bypass.vbs")
For i = Lbound(arr) to Ubound(arr)
fsofile.WriteLine arr(i)
Next
fsofile.Close
' Open Scripting shell and Run bypass file
Set wshShell = CreateObject("Wscript.Shell")
wshShell.Run("bypass.vbs")
' open outlook instance which, if above if stmt ran,
' will be intercepted by script shell running bypass file
Set oapp = CreateObject("Outlook.Application")
' this net line triggers the confirmation screen
Set obj = oapp.GetNamespace("MAPI")
' This is the line of code which generates the security prompt
' which in 2000 and 2002 is successfully suppressed, but in
' 2003 is not.
user = obj.CurrentUser
' close script object running bypass file
Set obj=Nothing
Set oapp = Nothing
Set wshShell=Nothing