Miramac / node-office-script

Scripting MS Office application with node.js
ISC License
49 stars 5 forks source link

Speaker Notes per slide? #25

Closed cliqer closed 4 years ago

cliqer commented 4 years ago

Hi and thank you for this. Is there a way to read and return PPT Speaker notes per slide? If so what would be the best approach?

Miramac commented 4 years ago

Is unfortunately not yet possible. But I like the idea and believe it is a useful enhancement.

Miramac commented 4 years ago

try this:

const path = require('path')
const Presentation = require('office-script').Presentation
const presentation = new Presentation(path.join(__dirname, 'myPresentation.pptx'))
// get all slides 
const slides = presentation.slides()
// get the notes of slide 2
const slideNotes = slides[1].notes()
console.log(slideNotes)
// close file and powerpoint
presentation.quit()

but the slide notes funtion is at the moment read only. Writing notes will be added later.

cliqer commented 4 years ago

Amazing! thank you