G
GeorgeMar
I am using the code (below) that I found on this site and it works well with
Office 2002 on win 98 but won't work in Office 2003 on Win 2000. This script
is created and run from a Access VBA.
It would appear that this line - "While fso.AppActivate(""Microsoft
Outlook"")=FALSE", - is never set to TRUE
Any Help please
George
arr = Array( _
"Set fso=CreateObject(""WScript.Shell"")", _
"While fso.AppActivate(""Microsoft Outlook"")=FALSE", _
" wscript.sleep 7000", _
"Wend", _
"fso.SendKeys ""a"",True", _
"fso.SendKeys ""{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")
Set WSHshell = Nothing
Office 2002 on win 98 but won't work in Office 2003 on Win 2000. This script
is created and run from a Access VBA.
It would appear that this line - "While fso.AppActivate(""Microsoft
Outlook"")=FALSE", - is never set to TRUE
Any Help please
George
arr = Array( _
"Set fso=CreateObject(""WScript.Shell"")", _
"While fso.AppActivate(""Microsoft Outlook"")=FALSE", _
" wscript.sleep 7000", _
"Wend", _
"fso.SendKeys ""a"",True", _
"fso.SendKeys ""{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")
Set WSHshell = Nothing