fbpx

PowerPoint VBA code to modify slide notes

Just found a solution to a longstanding problem I was facing. Therefore, I thought of documenting it for those who may have the same issue.

The use case is: Using VBA, how to write in PowerPoint notes page?

Each slide has a notes area. I want to write custom text as notes using VBA.

Slide notes area in PowerPoint
Notes area in a slide

The SLIDE object has a NOTESPAGE property which itself contains many things. But I could not find the right place to add this text.

The documentation for NOTESPAGE mentions that it is a SLIDERANGE object. The syntax is complicated and confusing. This is because, what we see below the slide as notes is a subset of the actual Notes view. To see the real Notes view you must choose View tab on the ribbon and select Notes Page. The Notes Page is actually a page with a proper layout. But this is even more confusing.

Finally I found the correct object.

<slide>.notespage.shapes(2).textframe.textrange.text

Just use this syntax and then retrieve or add text. That is all there is to it.

One Response

Queries | Comments | Suggestions | Wish list