I'm looking for some advice about saving OpenXML documents, specifically a PresentationDocument.
In my scenario I open a PowerPoint .pptx presentation directly from disk, that acts as a template. I then add (copy) slides from various other PowerPoint presentations. For each separate source presentation I also add its MasterSlideParts and SlideLayoutParts.
Question 1: When the presentation needs saving, is there a single command I can issue that will save all changes to the PresentationDocument? Or do I have to manually save each item that is new or been been changed, eg:
presentationDocument.PresentationPart.Presentation.Save();
foreach (var slideMasterPart in presentationDocument.PresentationPart.SlideMasterParts)
{
slideMasterPart.SlideMaster.Save();
}
Question 2: When opening a PresentationDocument, there is an option for "autosave" which seems to default to "true". Can anyone explain exactly what autosave does?
Something I read suggests that this saves everything in the PresentationDocument when the PresentationDocument is disposed of. Is this correct?
If so, I will need to set autosave=false, since I will need to control saving myself, in order to be able to test the presentation-building logic.
Thanks in advance for any answers.
Steve