I am trying to hide the menubars and toolbars that are (sometimes) displayes as soon as a new PDF file is opened via the webbrowser:
ufPdfs.WebBrowser1.Document.write "<HTML><Body><embed src=""" & txtBePa & """ width=""100%"" height=""100%"" /></Body></HTML>"
I tried to do this in 'BeforeNavigate2', but that does not have the expected result.
Private Sub WebBrowser1_BeforeNavigate2(ByVal pDisp As Object, URL As Variant, Flags As Variant, TargetFrameName As Variant, PostData As Variant, Headers As Variant, Cancel As Boolean) With WebBrowser1 .AddressBar = 0 .FullScreen = True .MenuBar = False .TheaterMode = True .Toolbar = 0 End With End Sub
Does someone know how to get rid of these things?