PDFs no longer open in the legacy IE browser control (3 Viewers)

@KitaYama
I'll contact the Access team again later today to check if there is any progress on the issue with PDFs in the legacy browser control.

Before I do so, can you elaborate on the issues with logging into a website with a user name & password in the Edge browser control.
Its not something I've ever needed to do so I don't have an example to test with
Do you have something you could upload for me to use for testing (using either browser control).
 
Last edited:
@KitaYama
I'll contact the Access team again later today to check if there is any progress on the issue with PDFs in the legacy browser control.

Before I do so, can you elaborate on the issues with logging into a website with a user name & password in the Edge browser control.
Its not something I've ever needed to do so I don't have an example to test with
Do you have something you could upload for me to use for testing (using either browser control).
While I can't share the accdb, I can confirm that with the legacy browser control I used to be able to log in to a site. I asked Claude AI for a version that would use JS to log in with the Edge browser control, but I failed to get it to work. Fortunately, it's not that big of a deal in this instance and now I just let the Browser control load and then log in manually a couple of times a week when I need to. The browser does remember by my credentials to make it easier.

The point is, it's a whole different ballgame code-wise and more than a little PITA and I would be displeased if I had to support clients' usage.
 
This is a very simplified version of something you can work with in legacy web browser.
The form has a web browser control that opens a web site. The target page has two textboxes and a button to click for login.
Form's on-load event calls Kedi_LogUserIn. The textboxes are filled and the button is clicked. User doesn't need to do anything. This works in legacy browser. After more than a week, neither Copilot nor Chatgpt could offer a code that can do the same in modern web browser.

SQL:
Option Compare Database
Option Explicit

Private Browser As Object

Public Function SetBrowser(frm As Access.Form)
    Set Browser = frm.wBrowser.Object
End Function

Public Sub Kedi_LogUserIn(frm As Access.Form)
    If Browser Is Nothing Then
        SetBrowser frm
    End If
 
    With Browser
        Do While .Busy Or .ReadyState <> 4
            DoEvents
        Loop
        .Document.all.Item("USER_ID").Value = "********"
        .Document.all.Item("PASS_WD").Value = "**********"
        .Document.all.Item("Login_Button").Click
    End With

End Sub

Public Sub CloseBrowser()
    Set Browser = Nothing
End Sub

Form's event:
SQL:
Private Sub Form_Load()
    Kedi_LogUserIn Me
End Sub

Private Sub Form_Close()
     CloseBrowser
End Sub
 
Last edited:
Many thanks. Looks straightforward enough.
I’ll test it using the legacy browser control and assuming that works, I’ll then try adapting it for the Edge browser control

If anyone else has got similar code to work using the Edge browser control then I’d like to hear about it … and I’m sure @KitaYama would like to know as well. 😀
 
This is a very simplified version of something you can work with in legacy web browser.
The form has a web browser control that opens a web site. The target page has two textboxes and a button to click for login.
Form's on-load event calls Kedi_LogUserIn. The textboxes are filled and the button is clicked. User doesn't need to do anything. This works in legacy browser. After more than a week, neither Copilot nor Chatgpt could offer a code that can do the same in modern web browser.

SQL:
Option Compare Database
Option Explicit

Private Browser As Object

Public Function SetBrowser(frm As Access.Form)
    Set Browser = frm.wBrowser.Object
End Function

Public Sub Kedi_LogUserIn(frm As Access.Form)
    If Browser Is Nothing Then
        SetBrowser frm
    End If
 
    With Browser
        Do While .Busy Or .ReadyState <> 4
            DoEvents
        Loop
        .Document.all.Item("USER_ID").Value = "********"
        .Document.all.Item("PASS_WD").Value = "**********"
        .Document.all.Item("Login_Button").Click
    End With

End Sub

Public Sub CloseBrowser()
    Set Browser = Nothing
End Sub

Form's event:
SQL:
Private Sub Form_Load()
    Kedi_LogUserIn Me
End Sub

Private Sub Form_Close()
     CloseBrowser
End Sub
Yo have to use JavaScript to "talk" to new Edge Browser.
Try something like this as starting point:


Code:
Option Compare Database
Option Explicit
' Using generic Control to avoid "Type Not Defined" errors
Private BrowserControl As Access.Control

Public Sub Kedi_LogUserIn(frm As Access.Form)
    If BrowserControl Is Nothing Then
        SetBrowser frm
    End If
 
    Dim jsCode As String
 
    ' JavaScript is the only way to talk to the New Browser

    jsCode = "document.getElementById('USER_ID').value = '********';" & _
             "document.getElementById('PASS_WD').value = '**********';" & _
             "document.getElementById('Login_Button').click();"

    ' Using .Object to access the Edge-specific ExecuteJavascript method
    On Error Resume Next
    BrowserControl.ExecuteJavascript jsCode
 
    If Err.Number <> 0 Then
        MsgBox "Could not execute login script. Ensure the page is fully loaded.", vbInformation
    End If
    On Error GoTo 0
End Sub
 
Last edited:
@xavier.batlle
Answering from an Edge browser control in Access!
Yes, you need to use Javascript for the Edge browser control but also need to avoid using .Object as that isn't available in the Edge control
 
Experimenting with logging into this site using an Edge browser control
The code enters my user name & password correctly but the login button doesn't get clicked

Not sure if that's because there are 2 alternative buttons that can be clicked to login or if the site is blocking automated logins
 
@KitaYama
Thanks for confirming that the legacy browser control no longer displays PDFs even in versions as far back as 2508 (which used to be OK). To me that acts as further confirmation that the problem is due to a January Windows 11 update and not Access itself, as I first suggested back in post #1.
I also don't believe Acrobat is the problem as users who don't have that installed have the same issue.

@Albert D. Kallal
The issue is nothing to do with the Edge browser control in Access nor with the Edge browser itself
It is specifically that the old Access legacy browser control no longer displays PDFs for users running recent versions of Win 11. Win 10 is OK
Ah, very well. Of course the legacy IE access browser control actually does not have PDF ability built in. It relies on AcroPDF.dll, and that's been removed from newer installs of windows 11........

So, if you install a older version of Adobe reader, then Access IE should then start to render PDF's.
So, since we ARE using the older browser here, then windows 11 in theory should/will require AcroPDF.dll, and that means installing a legacy version of Adobe to make this work.

Hence, you could try installing a older version of Adobe reader:


So, a fresh win 10, or a fresh win 11 NEVER could display a pdf inside the Access browser control. This only worked AFTER having installed a pdf viewer.....(which most people did). Now that browsers can display PDF's, then "more often" a win 10 or win 11 pc will not have a pdf viewer having been installed. Your first screen shot shows pdf "icon", but it's the one from the browser -- but NOT the legacy one from Adobe!

It's certainly possible that windows updates removed, or broke the AcroPDF.dll, or un-registered it.

Either way, then when trying to display a pdf, we see the attempt to use the newer browser if a working .pdf viewer (non browser based one) does not exist or is not available (and thus the default extension for pdf's points to the newer Edge Browser). So, in a round about way, your first screen shot shows that Edge browser trying to open the .pdf, since the .pdf extension is now associated with the Edge browser (so, yes, the Edge browser is involved in this issue).

So, either re-registering AcroPDF.dll, or installing a older Adobe PDF viewer should fix this issue......

However, perhaps re-associating the .pdf extension with the Adobe Reader as opposed to the Edge browser as your screen cap shows would also fix this issue...... (so, Edge is relevant here, since it sure looks like Edge has stolen the .pdf extension as per your first screen shot.....).


R
Albert
 
Hmm...
I agree with some of that but I don't believe its entirely true. Rather than speculate, I've tested most of your comments above.

Back in the day, it was certainly true that PDF wouldn't open within Access unless Acrobat Reader had been installed.
I've just confirmed that on an old A2010 / Win 10 VM and got the same Open / Save dialog without Reader installed..

However, I'm fairly sure that AcroPDF.dll hasn't been a requirement for many years with Edge and other browsers having PDF functionality.

My screenshot in post #1 was from a Win 11 laptop that had never had Acrobat Reader installed and has Edge as the default app for opening PDFs as stated. I've not rolled back Win 11 to before the Jan updates because I know that I could previously open PDFs in the legacy browser control (as well as the Edge browser control).

As many others have reported both here and on other forums, the legacy browser can no longer open PDFs in Win 11 (but is still OK in Win 10)
This change occurred after one of the Win 11 Jan 2026 updates.

As a test, I just installed first a 2022 version of Acrobat Reader then the latest version.
The legacy browser control no longer shows the Open or Save dialog from post #1 but it does show the blank grey box as others have reported - still no PDFs shown

And I tried making Acrobat the default - no effect whatsoever.
 
@xavier.batlle
Answering from an Edge browser control in Access!
Yes, you need to use Javascript for the Edge browser control but also need to avoid using .Object as that isn't available in the Edge control
I don't use the Edge WebBrowser control, but I tested it when I watched this interesting video by Richard Rost:
 
I've tried multiple different variations of the Edge browser control. None actually click the Login button.
It may well be that this site is blocking automated login clicks
@Jon would be the one who could definitively answer that

For now I'm putting this to one side. Perhaps, tomorrow I'll try some other sites
Bearing in mind neither @KitaYama nor @GPGeorge were successful, it seems there is a more widespread problem
 

Users who are viewing this thread

Back
Top Bottom