Viewing HTML text on Access 2016 form

I had this question after viewing How can I display HTLM from a string in a WebBrowser Control?.

In Access 2016 this does not work. The WebBrowser control no longer has a .Navigate method (you use .ControlSource = "about:blank" I believe) and no longer has a .Document property ! Does anyone know the 'Access 2016' way of doing this ?
Steve BaxterAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

BitsqueezerCommented:
Hi,

I do not have A2016 available but beginning with A2010 Access introduced the Webbrower control as an internal control. But independent of that you can still include the old ActiveX external webbrowser control as a an ActiveX control which should work like before. The author of the other thread you linked used the external ActiveX control.

Cheers,

Christian
0
ste5anSenior DeveloperCommented:
Yup, in the code behind:

Option Compare Database
Option Explicit

Private WithEvents m_WebBrowser As SHDocVw.WebBrowser

Private Sub Command1_Click()

  m_WebBrowser.Navigate2 "https://bing.com"

End Sub

Private Sub Form_Load()

  Set m_WebBrowser = WebBrowser0.Object
    
End Sub

Private Sub m_WebBrowser_NavigateComplete2(ByVal pDisp As Object, URL As Variant)

  MsgBox "m_WebBrowser_NavigateComplete2: " & URL

End Sub

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Steve BaxterAuthor Commented:
Thanks all- I went back to the ActiveX WebBrowser control and uses a simplified version of the suggested code and it works just fine !
0
ste5anSenior DeveloperCommented:
Code used by OP.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.