Changing Text of Textbox in Slide Show Mode?

  • Thread starter Thread starter Kenji
  • Start date Start date
K

Kenji

I'm trying to change text while in slide show mode. I call this method.

Sub change()
ActiveWindow.Selection.SlideRange.Shapes("Rectangle
2").TextFrame.TextRange.Text = "NEW TEXT"
End Sub

, but the data does not change on the slideshow. It works in regular..
slide editting mode. How can I make this happen? Thanks!

Kenji
 
Kenji,

That will not work in Slide Show mode because you can't have anything
selected (as required by ActiveWindow.Selection). You can change the
text in a shape. Examples 6.6, 6.7, and 6.8 on my Web site (click on
Examples by Chapter and Chapter 6) all include changing the text in a
text box:

http://www.loyola.edu/education/PowerfulPowerPoint/

The basic idea is that

ActivePresenation.SlideShowWindow.View.Slide.Shapes(1) _
.TextFrame.TextRange.Text = "New Text"

will change the text for the first shape on a slide.

--David

--
David M. Marcovitz, Ph.D.
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.loyola.edu/education/PowerfulPowerPoint/
 
Kenji,

You have to tweak your code when you are running a slideshow.

Sub Change2()
ActivePresentation.Slides(1).Shapes(1).TextFrame.TextRange.Text = "NEW TEXT"
End Sub

This will change the text for the 1st (must be an existing object) object/shape on slide1,

Cheers
TAJ Simmons
microsoft powerpoint mvp

awesome - powerpoint backgrounds,
free powerpoint templates, tutorials, hints and tips etc
http://www.powerpointbackgrounds.com
 
Back
Top