Microsoft Producer for PowerPoint 2003 SDK banner art
PreviousNext

Previewing the Presentation

You can write code that allows the user to preview the published presentation after the publishing process has completed. If the presentation has been published using only one profile, launch a browser window to show the Web page generated by Producer. To do this, append to the publishing path (or the path retrieved by WebHost.PlaybackAddress) an additional slash for HTTP addresses, or two backslashes (you must use a backslash as an escape character) for UNC addresses, to separate the path from the file name. Then append the presentation name and the .htm file name extension.

If the presentation has been published using multiple profiles, you can allow the user to view the presentation at a particular bit rate. To do this, append the following text to the URL:

#profile=index

In the preceding text, index represents a number that corresponds to the index of the profile in the e-service WebHost object. This index is the number retrieved by the Profiles.Item property. The following example creates a variable that contains a URL of a presentation, named "MyPresentation", that specifies playback using the second profile added to the WebHost object:

var URL = http://MyServer/MyPath/MyPresentation.htm#profile=1

You can then use JScript to launch a separate browser window to display the presentation:

window.open(URL);

If you store profile GUIDs for your e-service in the registry, and write your e-service to publish to the stored profiles, Producer only publishes the presentation to the profiles that are valid for the content in the presentation. This can create a unique situation where the WebHost.GetProfiles method retrieves a Profiles object that contains more profiles than have been actually published. In this case, you must exclude the unused profiles from the list of options you present to the user. See the section Checking the Timeline for details about how to exclude profiles that are incompatible with the presentation.

PreviousNext


© 2001-2003 Microsoft Corporation. All rights reserved.