/// <summary> /// Save the given presentation to the given file name. /// </summary> /// <param name="presentation">non-null presentation to save</param> /// <param name="fileName">non-null, writable filename</param> /// <remarks>may throw any of the same exceptions that File.Create throws</remarks> public void SavePresentation(PowerPoint.Presentation presentation, string fileName) { // TODO: error handling System.IO.Stream stream = System.IO.File.Create(fileName); IFormatter formatter = new BinaryFormatter(); SlideViewer.SlideDeck sd = this.MakeSlideDeck(presentation, fileName); SlideViewer.CSDDocument csd = new SlideViewer.CSDDocument(); csd.SetInfo(sd); formatter.Serialize(stream, csd); stream.Close(); }