PDA

View Full Version : VBA: Internet Explorer zoom level



baralus
04-23-2018, 05:59 AM
Hi all, I have this code that can open Internet Explorer and Browse for a webpage. Now what I want to learn is how to adjust the zoom-in and zoom-out level and scroll level of the webpage after it loaded. Hoping someone could help me. Thank you



Sub BrowseToSite()
Dim shp As Shape
Dim IE As New SHDocVw.InternetExplorer
Dim x As Long
'Set IE = New SHDocVw.InternetExplorer


IE.Visible = True
apiShowWindow IE.hwnd, SW_MAXIMIZE
IE.Navigate "https://en.wikipedia.org/wiki/Main_Page"


Do While IE.ReadyState <> READYSTATE_COMPLETE: Loop


Debug.Print IE.LocationName, IE.LocationURL

IE.Document.forms("searchform").elements("search").Value = "VBA"
IE.Document.forms("searchform").elements("go").Click

end sub