Web browser embedded in slide displays unwanted screen

  • Thread starter Thread starter another Dan
  • Start date Start date
A

another Dan

Greetings!
PPT 2007
Have embedded a web browser object in a couple of slides, in order to
display html files stored locally. The files load correctly when a button on
the slide is clicked. My problem is that in the period after arriving at the
slide and before this button gets clicked, the browser displays the contents
of the directory where the file resides. A blank screen, or some placeholder
or other would be fine, but the list of files looks pretty ugly...
Any assistance would be warmly appreciated!
 
Hi Steve,

Thank you for your reply!

I followed the guidance on a MS reference page (Article ID: 291926) using an
action button to load a web page. The suggested code was:

Sub go2URL()
Dim varURL As Variant

varURL = "http://www.microsoft.com"
WebBrowser1.Navigate varURL
End Sub

I adjusted the destination to the actual html file:
varURL = "file:///C:/.../....html"

This works well enough, but displays the contents of the folder just above
the folder containing the html file (perhaps because the pptm resides there,
at the moment?). Not elegant.

It would be even better to load the desired page as soon as the slide opens,
but that wasn't the hint I found. ☺

(Was attempting to get around having to rely on the excellent LiveWeb
utility kindly made available by Shyam Pillai, because it needs to be loaded
on each machine that runs the presentation.)

Any suggestions warmly welcomed!
 
So suppose you put an image atop the control then have the code in your
button make
the image invisible after allowing time for the URL to load.

That won't work since in PPT 2007 all activex controls are on top in terms
of Z-order.

Regards,
Shyam Pillai

Handout Wizard: http://skp.mvps.org/how
 
Gentlemen, thank you both.

Could anyone recommend a way to have the browser load its page as soon as
the slide opens, and not display anything until the page is loaded? Or
display something innocuous until the desired page is loaded?

Many thanks!
 
Thanks for the additional suggestions!

Experimented with making the browser ax control visible/invisible, but
without success. Defeated by my ignorance, I'm afraid.
 
Thank you for that!

I eventually stumbled across and used something like this:

Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As
Variant)
Dim varURL As Variant

' Check to see if this is the first time this
' control has been run, if so, load the page.
If URL = "" Then
varURL = "\\path\file.html"
WebBrowser1.Navigate varURL
End If

End Sub

Seems to be working...

Thanks again!
 
Back
Top