WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

User Samples

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Internet Explorer Refresh Current Instance

 Keywords:  Internet Explorer Refresh Current Instance OLECMDID_REFRESH ExecWB Method Shell.Application Windows

objShell = CreateObject("Shell.Application")
objInstances = objShell.windows
objIE = 0
If objInstances.Count > 0 ; make sure we have instances open.
    ForEach objIE In objInstances
       sName = StrLower(objIE.FullName)
       If StrIndex( sName, 'iexplore.exe', 1, @FWDSCAN ) != 0 ; internet explorer not windows explorer.
        ret = AskYesNo( "Found instance of InternetExplorer ":objIE.LocationURL, "Would you like to refresh?" )
        If ret
           objInstances = 0
           objShell = 0
           Break
        EndIf
      EndIf
    Next
EndIf
If objIE == 0
   Pause('Notice', 'Unable to locate any running instances of InternetExplorer')
   Exit
EndIf

OLECMDID_REFRESH = 22
null = ObjectType("NULL", "")
objIE.ExecWB(OLECMDID_REFRESH, 0, null, null )
Exit

Article ID:   W18141
Filename:   Internet Explorer Refresh Current Instance.txt
File Created: 2011:07:15:12:42:20
Last Updated: 2011:07:15:12:42:20