Menu:

Links:

Use these links to navigate the FAQ:

Next:
The TEXTEXTRACT template

Previous:
The PLAINTEXT template for screenreader users

All about PPT2HTML index page

Updated
7/25/2016

Microsoft MVP Logo

The PLAINTEXT template modified to include sound

This template is very similar to the PLAINTEXT template, but it's wired to play narration and transition sounds automatically in MS Explorer.

Netscape and Opera users will have to click a button to play the sound.

Now the blow by blow ...

First, the usual HEAD stuff:

<html>
<head>
<TITLE>:Prefs.PageTitle:</TITLE>
</head>

Now some JavaScript to detect the browser and deal with the sounds accordingly:

<SCRIPT LANGUAGE="JavaScript">
var MSIE=navigator.userAgent.indexOf("MSIE");
var NETS=navigator.userAgent.indexOf("Netscape");
var OPER=navigator.userAgent.indexOf("Opera");
if((MSIE>-1) || (OPER>-1)) {
document.write("<BGSOUND SRC=:Slide.TransitionSound: LOOP=0>");
} else {
document.write("<EMBED SRC=:Slide.TransitionSound: AUTOSTART=TRUE>");
document.write("HIDDEN=true VOLUME=100 LOOP=FALSE>");
}
// End -->

</SCRIPT>

Rather than break up the script above, we'll explain a few PPT2HTML-specific bits here:

Slide.Transition.Sound: gives us the name of the WAV file we've added as a slide transition sound on each of the slides. The Javascript decides whether to include it as code that Explorer will understand (and play back as a background sound automatically) or as code for other browser, so it appears as a clickable link to play the sound.

Now we turn to the text. Notice that there's no :Slide.Image: here. This template produces pages that are made up entirely of plain HTML text, no images.

First, we want to grab the slide title. :Slide.Ph.TitleText: gives us that - the text from the slide's Title placeholder if any or blank if there isn't any Title placeholder there.


<CENTER><H1>:Slide.Ph.TitleText:</H1></CENTER>
<HR>

Now the slide's subtitle text if any -- we use :Slide.Ph.SubtitleText: for this. We also ask for the slide's placeholder BODY text as an html formatted bulleted list.

This is a handy trick. See, a slide might have a subtitle (if it's based on the Title master) or it might have regular body text (if it's based on the normal Slide master) but it'll never have both, so we're safe asking for both. We'll get a blank for one and text for the other. Whichever's there, we get. Whatever's not there, the placeholder gets blanked out and nothing appears. All in one neat little smattering of HTML:


<CENTER><H2>:Slide.Ph.SubtitleText:</H2></CENTER>
<FONT SIZE="4">:Slide.Ph.BodyText1_AsBullets.HTML:</FONT>
<HR>

The next bit produces an invisible table that contains links to our home page, the previous slide, the next slide and numbered links to each slide in the presentation. With a twist. :Nav.PreviousOrHome: links to the previous slide UNLESS we're viewing the first slide in the presentation. If we're on the first slide, it links back to the Home Page URL we specified in Preferences. :Nav.LinksToAll: produces the numbered links to each slide.


<CENTER>
<TABLE><TR>
<TD><CENTER><A HREF="Prefs.Home">Home</A></CENTER></TD>
<TD>&nbsp;&nbsp;</TD>
<TD><CENTER><A HREF=":Nav.PreviousOrHome:">Previous</A></CENTER></TD>

  

<TD><CENTER>:Nav.LinksToAll:</CENTER></TD>
<TD>&nbsp;&nbsp;</TD>
<TD><CENTER><A HREF=":Nav.NextOrHome:">Next</A></CENTER></TD>
</TR>
</TABLE>
</CENTER>

Close the body tag and that's that.


</body>
</html>

[Previous] [Home] [Next]