copy text on note pages with VBA

  • Thread starter Thread starter Örjan Skoglösa
  • Start date Start date
Ö

Ö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
 
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
' ------------------------------------------
 
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
 
See if this does what you're after:

Export the notes text of a presentation
http://www.rdpslides.com/pptfaq/FAQ00481.htm

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

--
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
Featured Presenter, PowerPoint Live 2004
October 10-13, San Diego, CA www.PowerPointLive.com
================================================
 
Back
Top