Forum Discussion
Access Forms: Edge Web Browser Control
George_HepworthI fully agree, it is somehow clumsy if you introduce a new browser and keep some attached tools unchanged over years, knowing that some hungry crowd is waiting ...
If found this in one of my clients' databases 🙂
- George_HepworthSep 16, 2023Silver Contributor
Daniel Pineault has provided a lot information on the modern web browser control.
- TassimoSep 16, 2023Copper ContributorHi George, I'm trying to display some pages and documents from Ms-Online Sharepoint e.g. https://mycompanyname.sharepoint.com in Control. I have entered the path in the Trusted table. But it is opened separately in the browser, not in the control. Is there a solution. The documentation didn't give me any clue. Thank you.
- danielchent1May 10, 2023Copper Contributor
Thank you for your answer.
I have tried the same.
What i need is to be able to run either one of these function and regurn objects such as html table cell properly collection etc.
Dchen
- isladogsMay 10, 2023MVP
The 2 methods are actually RetrieveJavascriptValue & ExecuteJavascript
So far I've not done much with either of these but I use the following code to grab the value of co-ordinates from 2 textboxes latbox & lngbox on a local HTML file
Dim strPath As String, sngLat As Single, sngLong As Single strPath = CurrentProject.Path & "\geolocal.html" With Me.EdgeBrowser0 .Navigate "https://msaccess/" & strPath 'need prefix for local HTML file .Visible = True DoEvents Do Until .ReadyState = 4 Loop sngLat = .RetrieveJavascriptValue("document.getElementById('latbox').value") sngLong = .RetrieveJavascriptValue("document.getElementById('lngbox').value End Withtwo
- danielchent1May 10, 2023Copper Contributor
II have seen the details
In general there are two methods
Javascript execute
Javascript get value
- the names are not accurate 😂
I was looking for code samples on both.
At this poing i find the control little bugy
We would like to transition ASAP but we need some answers
Dchen
- George_HepworthMay 10, 2023Silver ContributorIt is my understanding that the new Edge web browser control uses Javascript. Little documentation is available yet, though.
- danielchent1May 09, 2023Copper ContributorHi
currently we are using the legacy webbrowser control
the functionality we are missing is access to the webbrowser.Document
this allows us to access document elements in vba and use it to open forms with filter criteria.
two questions:
1. is it possible to achieve that is the new edge control - (old code sample below)?
"TdCellIndex = em.cellIndex
VarValue = em.innerText
Set tb = Doc.getElementById("NGTable1")
For Each th In tb.getElementsByTagName("th")
If th.cellIndex = TdCellIndex And th.ID <> "" Then
strCol = th.ID
Exit For
End If
Next th"
2. do we need a new runtime to use the edge control?
thank you - isladogsMar 18, 2023MVPProblem 1 is also partly resolved with the release of the new Edge browser control to those in Office Insiders channels.
The URL limit for Google mapping APIs is currently 16K characters. Using the .Navigate property it should be possible to enter long URLs up to this limit (if not higher). However, at the moment the old 2048 character limit still applies using the .ControlSource property. This is a known issue which should hopefully be fixed before the wider release of the new control to all users, hopefully in April - George_HepworthMar 16, 2023Silver ContributorProblem 2 is resolved in the new Web Browser control as of today.
- isladogsMar 29, 2022MVP
My main issues of concern right now are:
1. The URL limit in IE is just 2083 characters whereas in Chrome / Edge, its at least 64,000 characters. The low limit in the IE web browser makes it difficult to load maps with several layers.
2. The Google JavaScript API no longer works with IE & has stopped one of my mapping apps working.