title: How to add PPT notes using docx4j
body: <p>I am creating PPT files using the library docx4j. I have been able to create slides with text and images, but I have not been able to add notes to them.</p>
  
  <p>I am creating the slide like this:</p>
  
  <pre><code>MainPresentationPart pp = (MainPresentationPart)presentationParts.get(new PartName("/ppt/presentation.xml"));
  SlideLayoutPart layoutPart = (SlideLayoutPart)presentationParts.get(new PartName("/ppt/slideLayouts/slideLayout1.xml"));
  SlidePart slidePart = PresentationMLPackage.createSlidePart(pp, layoutPart, new PartName("/ppt/slides/slide" + ++slideNumber + ".xml"));
  </code></pre>
  
  <p>so I can add text or images to the body, but when I  try to access the field slidePart.notes it is null. I have tried to initialize it</p>
  
  <pre><code>slidePart.setPartShortcut(new NotesSlidePart());
  </code></pre>
  
  <p>but then everything inside notes is null and I have not achieved anything.</p>
  
  <p>So, does anyone have a working example of how to add notes to a PPT file?</p>
  
  <p>Many thanks</p>