How can I set the scrollbar Position on a Shell'd IE Window?
Ok,
I've used the Shell API to launch a Internet Explorer window and goto a certain webpage.
Now I've got control of the IE window, but the webpage is too long and therefore scrollbars appear on the right.
How can I take control of the scroll bar, to move the page down to a certain position?
Any help Appreciated.
Mrman
Re: How can I set the scrollbar Position on a Shell'd IE Window?
.SelStart to somewhere down the page?
Re: How can I set the scrollbar Position on a Shell'd IE Window?
IE supports .SelStart????
mrman, you said you have control of the IE window, what method are you using to do this? Are you automating it via VB, using webbrowser control reference, or the IE reference?
Re: How can I set the scrollbar Position on a Shell'd IE Window?
I use this code :-
Dim SWs As New SHDocVw.ShellWindows
Dim IE As SHDocVw.InternetExplorer
Dim html As String
Dim iX As Integer
Dim iY As Integer
On Error Resume Next
'cycle throught all ShellWindows, IE is a pointer to the current window
Dim tmpX As Byte
tmpX = Val(Windows.Text)
For Each IE In SWs
' is the window my site ?
If InStr(1, LCase(IE.LocationURL), "mysite.com") > 0 Then
'get the html
html = IE.Document.body.innerHTML
Thanks
Mrman
Re: How can I set the scrollbar Position on a Shell'd IE Window?
oops. thinking WebBrowser control. my mistake.
Re: How can I set the scrollbar Position on a Shell'd IE Window?
Manage to fix it :)
I put this command in :
Browser1.parentWindow.scrollTo Text1, Text1
Where text1 is the number point you wish to scroll to.
Thanks for looking
MrMan