copy text on note pages with VBA

Ö

Örjan Skoglösa

Hi,

Sorry if this has been asked recently or is obvious.

I would like to automatically copy all text in all notes pages in a
presentation.

But in the VBA help it says:

Note The following properties and methods will fail if applied to a
SlideRange object that represents a notes page: Copy method, Cut
method, Delete method, Duplicate method, [...]

I wonder if it´s possible to get a copy of the text in any other way?

Thanks very much in advance.

Örjan Skoglösa
 
S

Shyam Pillai

Hello Örjan,
This example will extract the text from the notes body and display it in the
immediate window. You can edit it as you deem fit.
' ------------------------------------------
Sub AccessNotesText()
Dim oSld As Slide
Dim I As Integer
For Each oSld In ActivePresentation.Slides
With oSld.NotesPage.Shapes
If .Placeholders.Count > 0 Then
For I = 1 To .Placeholders.Count
If .Placeholders(I).PlaceholderFormat.Type =
ppPlaceholderBody Then
Debug.Print "Slide " & CStr(oSld.SlideNumber) & vbTab &
_
.Placeholders(I).TextFrame.TextRange.Text
End If
Next I
End If
End With
Next oSld
Set oSld = Nothing
End Sub
' ------------------------------------------
 
Ö

Örjan Skoglösa

Hello Shyam,

Thanks a lot.

Your solution works very well.

Now, I would like to store the outcome in a way that makes it
accessible from the outside, e.g. in a txt-file.

I have learned that there in Word is a thing called
System.PrivateProfileString that I can use to store data "outside" the
application.

Is there something similar for PowerPoint?

Many thanks in advance.

Örjan
 

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