Quantcast
Channel: Open XML Format SDK forum
Viewing all articles
Browse latest Browse all 1288

Understanding relationship between SlideParts and their NotesSlidePart

$
0
0

I am trying to determine the relationship between SlideParts and their NoteSlideParts counterpart. Our team can create these objects and populate them properly, whoever we cannot create a relationship joining them. We start with an original template powerpoint file which has a Notes section in it. Then we make a clone of the original ppt. (As to never modify the Template) in doing so we lose the relationship to the Clone. Any assistance please. Below is the code we are using to create the slide Template then the Note section. If we do not delete the original it displays.

var presentationPart = presentationDocument.PresentationPart;
var slideIds = presentationPart.Presentation.SlideIdList.ChildElements;
string relId = ((SlideId)slideIds[0]).RelationshipId;    
var slideTemplate = (SlidePart)presentationPart.GetPartById(relId);

IEnumerable<NotesSlidePart> note = presentationPart.SlideParts.Select(slide => slide.NotesSlidePart);
var notesSlideParts = note as IList<NotesSlidePart> ?? note.ToList();
CreateNotes(notesSlideParts.First());

var newSlide = CloneSlide(presentationPart, slideTemplate, i);    

DeleteSlide(presentationDocument, Zero); <--- This Line removes relationship
presentationPart.Presentation.Save();


Viewing all articles
Browse latest Browse all 1288

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>