Also could use a sample to grab the currently projected slide image.
Thanks so much...
Mike
Dim sh As Shape
For Each sh In ActivePresentation.Slides(1).NotesPage.Shapes
If sh.HasTextFrame Then
If sh.TextFrame.HasText Then
MsgBox sh.TextFrame.TextRange.Text
End If
End If
Next sh
--
Steve Rindsberg PPT MVP
PPTLive ( http://www.pptlive.com ) Featured Speaker
CorelWorld ( http://www.corelworld.com ) Featured Speaker
PPTools: http://www.pptools.com
PPT FAQ: http://www.pptfaq.com
"Michael Brown" <m...@NOSPAM.purdue.edu> wrote in message
news:O9u5eDXJ...@TK2MSFTNGP11.phx.gbl...
foreach (PowerPoint.Shape sh in
ppPres.Slides.Range(curSlide).NotesPage.Shapes)
if (MsoTriState.msoTrue == sh.HasTextFrame)
if (MsoTriState.msoTrue == sh.TextFrame.HasText)
Console.WriteLine(sh.TextFrame.TextRange.Text);
So what do you mean by "simple" presentations? What would cause this to
fail? Can there be multiple text frames on a slide's notes page?
Mike
"Steve Rindsberg" <ab...@localhost.com> wrote in message
news:Oq2a1GZ...@tk2msftngp13.phx.gbl...
There can only be one notes text frame, but there could be any number of
other shapes with text on the notes page as well. You can draw on it just
as you would a slide.
If somebody knows a way of distinguishing the notes text object from the
other shapes, I'd *love* to know about it.
In a newly created presentation, it'll always have the same name, but you
can't rely on that. If the user deletes and recreates the notes or copies
from one slide to the next, the name of the notes text shape will change.
Are we having fun yet? ;-)
Regards
Shyam Pillai
"Steve Rindsberg" <ab...@localhost.com> wrote in message
news:eJdyYSfJ...@TK2MSFTNGP10.phx.gbl...
' ----- Beginning Of Code -----
Option Explicit
Const ERR_MSG = "Shape (unknown member) : Invalid request. Not valid for
notes or handout masters."
Function IsShapeOnSlide(oShp As Shape) As Boolean
On Error GoTo ErrHandler
Dim oAS As ActionSetting
Set oAS = oShp.ActionSettings(ppMouseClick)
IsShapeOnSlide = True
Set oAS = Nothing
Exit Function
ErrHandler:
If Err.Description = ERR_MSG Then
IsShapeOnSlide = False
Else
IsShapeOnSlide = True
End If
End Function
Sub Test()
Debug.Print IsShapeOnSlide(ActiveWindow.Selection.ShapeRange(1))
End Sub
' ----- End Of Code -----
--
Regards
Shyam Pillai
Handout Wizard
http://www.mvps.org/skp/how/
"Steve Rindsberg" <ab...@localhost.com> wrote in message
news:eJdyYSfJ...@TK2MSFTNGP10.phx.gbl...
That had me poking at things and it occurred to me:
Sub IsItNotesText()
Dim sh As Shape
Set sh = ActiveWindow.Selection.ShapeRange(1)
If sh.PlaceholderFormat.Type = ppPlaceholderBody Then
MsgBox "It's body text, so if this is a notes page, this is the notes
text. Case closed."
Else
MsgBox "It's something else."
End If
End Sub
So simple ...
--
Steve Rindsberg PPT MVP
PPTLive ( http://www.pptlive.com ) Featured Speaker
CorelWorld ( http://www.corelworld.com ) Featured Speaker
PPTools: http://www.pptools.com
PPT FAQ: http://www.pptfaq.com
"Shyam" <Sh...@Asia.com> wrote in message
news:uuvUaqfJ...@tk2msftngp13.phx.gbl...
Regards
Shyam Pillai
"Steve Rindsberg" <ab...@localhost.com> wrote in message
news:eyRaKghJ...@TK2MSFTNGP11.phx.gbl...
Are we talking at cross purposes? I was looking for a way to find out
whether a given shape was the notes text placeholder.
--
Regards
Shyam Pillai
Shyam's Toolbox for PowerPoint
http://www.mvps.org/skp/toolbox
"Steve Rindsberg" <ab...@localhost.com> wrote in message
news:eQ#x1JkJD...@TK2MSFTNGP12.phx.gbl...
Yup, that's what I arrived at (and realized later had worked out long ago
... it was a long day <g>)