That's weird. The first line is just a pointer to the selected text area of
the current text box, but it doesn't do anything. The second line will copy
whatever is selected, but that might be a shape and not text. So this should
not work. In fact I don't think it will get past the first line because it
is an incomplete statement (it's kind of like a phrase without a verb). It's
also not quite right. You might try something like:
ActiveWindow.Selection.ShapeRange.TextFrame.TextRange.Copy
Your original post said that you wanted to copy all the text from a slide.
This code looks like you are trying to copy the text from a single selected
text box. That is what my line of code does. So, once again, you need to
have a shape that has text selected and then run the macro.
If you really want all the text on a slide, it is a bit more complicated
because you have to loop through all the shapes on the slide, check each
shape to see if it has a TextFrame and then add the text to a something,
which you will then have to copy.
--David
Thanks, David
Here is one code I tried.
Sub servings()
ActiveWindow.Selection.SlideRange.Shapes.TextFrame.TextRange
ActiveWindow.Selection.Copy
End Sub
My object is to copy all text from the active window onto the clipboard so
that I can paste it later onto Notepad.
Thanks
Vic
--
David M. Marcovitz
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
Microsoft PowerPoint MVP
Associate Professor, Loyola University Maryland