Automatically Load Web Page on PowerPoint Slide

  • Thread starter Thread starter Duane Sears
  • Start date Start date
D

Duane Sears

In Microsoft Knowledge Base Article, 253699, the following
subroutine is provided for "automatically" loading a web
page into a Webbrowser embedded on a slide. However this
subroutine is slightly flawed because the slide has to be
viewed at least once in Show mode at before the web page
will actually load. After that, if you visit the slide a
second time (even after closing and restarting Show mode,
but not closing the file), the web page will always load
whenever you visit the slide in Show mode. Does anyone
know how to modify the visual basic code so that a web
page will load the first time the slide is actually
viewed??
=================================
Sub <WebBrowserN>_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 = "http://www.microsoft.com"
WebBrowser1.Navigate varURL
End If
End Sub
 
Back
Top