object model for speakers notes

A

Andy Fish

Hi,

I am trying to figure out the object model for speakers notes. The only
documentation I have found is VBAPP10.CHM

I see that the Slide object has a NotesPage property but rather than being a
simple TextRange or some such, this is actually a SlideRange i.e. the notes
for a single slide is a set of slides !!. There is no indication in the
documentation of how I should navigate round the notes pages to extract the
actual speakers notes, and what else I might find along the way.

Related to the same question, I can see that there are many types of shapes.
Given a shape object, how can I find out which type it is?

TIA

Andy
 
S

Steve Rindsberg

Hi,

I am trying to figure out the object model for speakers notes. The only
documentation I have found is VBAPP10.CHM

I see that the Slide object has a NotesPage property but rather than being a
simple TextRange or some such, this is actually a SlideRange i.e. the notes
for a single slide is a set of slides !!. There is no indication in the
documentation of how I should navigate round the notes pages to extract the
actual speakers notes, and what else I might find along the way.

True, Slide.NotesPage returns a SlideRange, but the range contains only one
"slide" (for most purposes, you can treat the notes page as though it were a
sort of slide).

To retrieve the speaker notes, you'd iterate through the
Slide(x).NotesPage.Shapes collection looking for a placeholder shape of type
Body. Here's an example:


Sub DemoGetNotesText()

Dim oSl As Slide
Dim sTemp As String

For Each oSl In ActivePresentation.Slides
sTemp = GetNotesText(oSl)
If sTemp <> "" Then
MsgBox sTemp
End If
Next

End Sub

Function GetNotesText(oSl As Slide) As String

Dim oSh As Shape

For Each oSh In oSl.NotesPage.Shapes
If oSh.Type = msoPlaceholder Then
If oSh.PlaceholderFormat.Type = ppPlaceholderBody Then
If oSh.TextFrame.HasText Then
GetNotesText = oSh.TextFrame.TextRange.Text
End If
End If
End If
Next

End Function
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top