• Status: Solved
  • Priority: Low
  • Security: Public
  • Views: 63
  • Last Modified:

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 ?
0
Steve Baxter
Asked:
Steve Baxter
  • 2
1 Solution
 
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
 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now