Shell to Internet Explorer

  • Thread starter Thread starter Ian
  • Start date Start date
I

Ian

I have an application in which I use a call to open Internet Explorer using
the following command on a button:

Dim objShell As Object
Dim strIeFilePath As String

Set objShell = CreateObject("WScript.Shell")

strIeFilePath =
objShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\IEXPLORE.EXE\")

Shell strIeFilePath & " C:\Program Files\MyPathFile.htm", vbNormalFocus

I would really like to restrict the size of the window that IE open into so
I can be consistent with the formatting in my page across different screen
sizes of my users but it appears the only options are "vbNormal" or
"vbMaximize".

Does anyone know a way of specifying the size of the window that opens.

Many thanks,
Ian.
 
I assume there must be an API to handle this. I did a quick google search
and came up with this

http://www.xtremevbtalk.com/showthread.php?t=61198

I haven't tried it, but it should point in the right direction. If you
would like more resources google "VBA API to resize active window" or
something like it.
--
Jack Leach
www.tristatemachine.com

- "A designer knows he has reached perfection not when there is nothing left
to add, but when there is nothing left to take away." - Antoine De Saint
Exupery
 
Back
Top