|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer|
How to: Publish Web Presentations
In Microsoft Office PowerPoint, you can publish a presentation directly to a Web server and you can edit HTML documents directly in PowerPoint.
Saving a presentation as a Web page is the process of creating and saving an HTML version of a presentation. To do this, use the SaveAs method, as shown in the following example which saves the current presentation as c:\myfile.htm.
Publishing a Web presentation is creating an HTML version of a presentation and saving it to a Web server or a file server by using the Publish method. This differs from saving a presentation as a Web page by using the SaveAs method in that when you publish a Web presentation, you can customize the presentation by setting various attributes, and you can publish the presentation directly to a Web server. After setting various properties of the WebOptions object, this example publishes the active presentation to a Web server with the URL address http://www.someones.homepage/mallard.htm.
With ActivePresentation With .WebOptions .FrameColors = ppFrameColorsWhiteTextOnBlack .RelyonVML = True .OrganizeInFolder = True End With With .PublishObjects(1) .FileName = "http://www.someones.homepage/mallard.htm" .SourceType = ppPublishAll .SpeakerNotes = True .Publish End With End With
When using the Publish method, you can customize the appearance, content, browser support, editing support, graphics formats, screen resolution, file organization, and encoding of the HTML document by setting properties of the DefaultWebOptions object and the WebOptions object. The DefaultWebOptions object contains application-level properties. These settings are overridden by any presentation-level property settings that have the same name, contained in the WebOptions object.
This example sets various application-level properties for Web publishing. They will be the default settings for any current or future loaded presentation until the settings are changed again. The code then resets the ResizeGraphics property for the active presentation, which overrides the application-level default. It publishes the active presentation as "c:\mallard.htm."
With Application.DefaultWebOptions .FrameColors = ppFrameColorsWhiteTextOnBlack .IncludeNavigation = False .ResizeGraphics = True End With With ActivePresentation .WebOptions.ResizeGraphics = False With .PublishObjects(1) .FileName = "c:\mallard.htm" .SourceType = ppPublishAll .SpeakerNotes = True .Publish End With End With