Wiki Markup |
---|
{description} {excerpt}Saves the PowerPointTemplate to a stream passed in as the stream parameter.{excerpt} {signature:C#} public void Save(System.IO.Stream stream) {signature}{signature:vb.net} Public Sub Save(ByRef stream As System.IO.Stream) {signature} {parameters} {param:stream}A stream to write the resulting PowerPoint file to.{param} {exceptions} {exception:InvalidOperationException}{{Save}} will throw this exception if it does not have a PowerPoint document handle ({{Save}} cannot be called before {{Open}}). {exception} {remarks}You can call {{Save}} more than once for a single instance of [PowerPointTemplate]. This allows you to save more than one copy of a generated file, and/or both save the file on the server and stream it to the client.{remarks} {example} {code:csharp|title=C#} using (PowerPointTemplate ppt = new PowerPointTemplate()) { ppt.Open("MyInputFilePath.pptx"); using (FileStream outputFile = File.OpenWrite("MyOutputFilePath.pptx")) { ppt.Save(outputFile); } } {code} {code:vbnet|title=vb.net} Using ppt As New PowerPointTemplate() ppt.Open("MyInputFilePath.pptx"); Using outputFile As File.OpenWrite("MyOutputFilePath.pptx") ppt.Save(outputFile); End Using End Using {code} {example} |
Page History
Overview
Content Tools