Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Extract text from slides and insert into notes section

54 views
Skip to first unread message

ppt...@gmail.com

unread,
Feb 28, 2006, 1:26:51 PM2/28/06
to
Hello,

I know there've been numerous posts regarding extraction of text from
the slides and whatnot, but what I'm interested in doing is extracting
the text from slides and then inserting that text into the notes
section of the slide.

I want to take notes for class, but I also want to be able to export
the notes section to MS Word and just print out the notes, not the
slides...

If anyone could point me to a program that can do this, I'd be greatly
appreciated, as I do not have any programming experience. Thank you!

Steve Rindsberg

unread,
Feb 28, 2006, 3:26:41 PM2/28/06
to

> I know there've been numerous posts regarding extraction of text from
> the slides and whatnot, but what I'm interested in doing is extracting
> the text from slides and then inserting that text into the notes
> section of the slide.
>
> I want to take notes for class, but I also want to be able to export
> the notes section to MS Word and just print out the notes, not the
> slides...

Search http://www.pptfaq.com for terms like "text"

There are a couple of macros that export slide text and/or notes text to text
files. You could run those, then open the text file in Word.

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================


ppt...@gmail.com

unread,
Mar 1, 2006, 12:18:36 PM3/1/06
to
But there would be no way to insert text from the slides into the notes
section of the powerpoint itself?

Steve Rindsberg

unread,
Mar 1, 2006, 5:28:07 PM3/1/06
to
In article <1141233516.3...@z34g2000cwc.googlegroups.com>,
Ppt...@gmail.com wrote:
> But there would be no way to insert text from the slides into the notes
> section of the powerpoint itself?

It could be done and wouldn't take too great an adaptation of the code in the
link I posted earlier; I just haven't the time to do it at the moment, though.

ppt...@gmail.com

unread,
Mar 18, 2006, 6:04:42 AM3/18/06
to
Would anyone else have the time to help me with this problem right now,
please?

Thank you!

ppt...@gmail.com

unread,
Mar 18, 2006, 4:55:24 PM3/18/06
to
I pasted some snippets of code together and got this:

======
Sub ExportAllSlideText()
Dim oSlide As Slide
Dim oShape As Shape

' Interate thru each slide in the presentation
For Each oSlide In ActivePresentation.Slides

' Interate thru each shape in the current slide
For Each oShape In oSlide.Shapes

' Check if the current shape has a text frame
If oShape.HasTextFrame Then

' Check if the text frame has text in it.
If oShape.TextFrame.HasText Then
With ActivePresentation.Slides(oSlide). _
NotesPage.Shapes(2).TextFrame.TextRange
Text = .Text & vbCr & oShape.TextFrame.TextRange.Text

End With
End If
End If
Next oShape

'Next slide
Next oSlide

'End routine
End Sub
======

What's wrong? The error message I get is: "Slides (unknown member): Bad
argument type. Expected collection index (string or integer)."

Thanks.

Steve Rindsberg

unread,
Mar 18, 2006, 7:04:49 PM3/18/06
to
In article <1142718924.8...@i40g2000cwc.googlegroups.com>,
Ppt...@gmail.com wrote:

Hey, that's the spirit ... jump in there and have at it.
See the comment below:

> I pasted some snippets of code together and got this:
>
> ======
> Sub ExportAllSlideText()
> Dim oSlide As Slide
> Dim oShape As Shape
>
> ' Interate thru each slide in the presentation
> For Each oSlide In ActivePresentation.Slides
>
> ' Interate thru each shape in the current slide
> For Each oShape In oSlide.Shapes
>
> ' Check if the current shape has a text frame
> If oShape.HasTextFrame Then
>
> ' Check if the text frame has text in it.
> If oShape.TextFrame.HasText Then

Change this:


> With ActivePresentation.Slides(oSlide). _
> NotesPage.Shapes(2).TextFrame.TextRange
> Text = .Text & vbCr & oShape.TextFrame.TextRange.Text
> End With

With oSlide.NotesPage.Shapes(2).TextFrame.TextRange


Text = .Text & vbCr & oShape.TextFrame.TextRange.Text
End With

> End If
> End If
> Next oShape
>
> 'Next slide
> Next oSlide
>
> 'End routine
> End Sub
> ======
>
> What's wrong? The error message I get is: "Slides (unknown member): Bad
> argument type. Expected collection index (string or integer)."
>
> Thanks.
>

-----------------------------------------

ppt...@gmail.com

unread,
Mar 18, 2006, 9:40:09 PM3/18/06
to
It seems that there's no error anymore...but it doesn't do what I want?
Weird. I run the macro, and it seems like it finishes, but there's no
text the the notes section. I save, close, and open the Powerpoint
presentation, and there's still no notes!

Any ideas? =/

ppt...@gmail.com

unread,
Mar 18, 2006, 9:59:58 PM3/18/06
to
I did:

With oSlide.NotesPage.Shapes(2).TextFrame.TextRange
Text = Text & vbCr & oShape.TextFrame.TextRange.Text
MsgBox Text
End With

Just to see what "Text" contained...it seems as if the text from the
slides is being collected, but it's not being saved/placed into the
notes section of each slide.

I made a test Powerpoint file of 5 slides with slide text on each
slide. The MsgBox showed that "Text" collected each line of the slide
text and kept adding on to it and by the end, "Text" contained words
from ALL 5 slides, rather than saving all the text from each slide to
its respective notes section and then clearing the variable.

ppt...@gmail.com

unread,
Mar 18, 2006, 10:16:56 PM3/18/06
to
OK, I look like a crazy person, posting 4, 5 times in succession...but
I finally figured it out. If you can optimize this code a little for
me, I'd greatly appreciate it!

======
Sub ExportAllSlideText()
Dim oSlide As Slide
Dim oShape As Shape

' Interate thru each slide in the presentation
For Each oSlide In ActivePresentation.Slides

' Interate thru each shape in the current slide
For Each oShape In oSlide.Shapes

' Check if the current shape has a text frame
If oShape.HasTextFrame Then

' Check if the text frame has text in it.
If oShape.TextFrame.HasText Then

' This is to keep adding text from each Shape to Text and then insert
it into the Notes


Text = Text & vbCr & oShape.TextFrame.TextRange.Text

oSlide.NotesPage.Shapes(2).TextFrame.TextRange.Text = Text

' Check to see what's in Text
' MsgBox Text

End If
End If
Next oShape

' Clear Text & Next slide
Text = ""
Next oSlide

'End routine
End Sub
======

Hope it helps somebody out there in the world! =)

Steve Rindsberg

unread,
Mar 18, 2006, 10:19:13 PM3/18/06
to
In article <1142737198.3...@e56g2000cwe.googlegroups.com>,
Ppt...@gmail.com wrote:
> I did:

Aw nuts. Bad eyes, small screen on this laptop ...
Sorry ... I missed this:

>

With oSlide.NotesPage.Shapes(2).TextFrame.TextRange
.Text = .Text & vbCr & oShape.TextFrame.TextRange.Text
MsgBox .Text
End With

Put a period in front of the word "Text" in three places.


>
> Just to see what "Text" contained...it seems as if the text from the
> slides is being collected, but it's not being saved/placed into the
> notes section of each slide.
>
> I made a test Powerpoint file of 5 slides with slide text on each
> slide. The MsgBox showed that "Text" collected each line of the slide
> text and kept adding on to it and by the end, "Text" contained words
> from ALL 5 slides, rather than saving all the text from each slide to
> its respective notes section and then clearing the variable.
>

-----------------------------------------

ppt...@gmail.com

unread,
Mar 19, 2006, 3:09:28 AM3/19/06
to
Hah, awesome. Works like a charm. Thanks!

Steve Rindsberg

unread,
Mar 19, 2006, 11:57:15 AM3/19/06
to
In article <1142755768.6...@e56g2000cwe.googlegroups.com>,
Ppt...@gmail.com wrote:
> Hah, awesome. Works like a charm. Thanks!

Beauty! Good work!

0 new messages