Consulting

Results 1 to 1 of 1

Thread: Open PDF in WebBrowswer Control on Userform

  1. #1
    VBAX Regular
    Joined
    Apr 2017
    Posts
    66
    Location

    Open PDF in WebBrowswer Control on Userform

    Trying to open PDFs in the WebBrowser Control.

    Code below works fine on a machine where Adobe default settings are set to open PDFs in browser.

    But, on a machine where Adobe settings are set to open PDFs in Adobe, code opens PDFs in Adobe not the WBC.

    Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) 
    
    WebBrowser1.Navigate "about:blank"
    
       While Me.WebBrowser1.Busy
          Sleep 100
       Wend
    
    Me.WebBrowser1.Navigate "C:\Users\bcro\Documents\Cro\Test.pdf"

    How can I get PDFs to open in the WBC when Adobe settings are set to open them in Adobe?

    PS. I'm aware of the AcroPDF control, but cannot get to work.
    Last edited by BrI; 12-11-2017 at 11:23 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •