john
Wed May 07 12:20:01 CDT 2008
Code that relys on selection (like yours) will never work except in edit
mpde. Shapes cannot be selected in show mode.
What you want does not need code - you can simply use triggered animations
See
http://www.pptalchemy.co.uk/powerpoint_hints_and_tips_tutorials.html#triggers
for help on this
If you must use code one way is to have shapes with alternate text (right
click > format shape) - set the alt text to the letter needed. Now also have
shapes with the letters of the alphabet. Make all these trigger this macro
Sub fillin(oshp As Shape)
Dim strletter As String
Dim fillshape As Shape
strletter = oshp.TextFrame.TextRange
For Each fillshape In ActivePresentation.SlideShowWindow.View.Slide.Shapes
If fillshape.AlternativeText = strletter _
Then fillshape.TextFrame.TextRange = strletter
Next
End Sub
To clear the letters use this macro
Sub clearall()
Dim fillshape As Shape
For Each fillshape In ActivePresentation.SlideShowWindow.View.Slide.Shapes
If fillshape.AlternativeText <> "" Then fillshape.TextFrame.TextRange = ""
Next
End Sub
Hope that helps
--
-------------------------------------------
Amazing PPT Hints, Tips and Tutorials
http://www.PPTAlchemy.co.uk
http://www.technologytrish.co.uk
email john AT technologytrish.co.uk
"GL109" wrote:
> I want to have the alphabet on the bottom and be able to click on the letter
> and have all the letters pop up at the same time. For example, i recorded the
> macro for "b" by clicking record macro, filling in the b's, and then stopping
> the macro. Then, tried to save that macro to a button that has the letter B
> on it so when i press it in the slideshow it populates them all. Why won't it
> run in slideshow mode?
>
> "John Wilson" wrote:
>
> > Yep - that's exactly the ugly code David refers to!
> >
> > It will not run in slide show mode. if you explain EXACTLY what you want to
> > happen I'm sure someone will point you in the right direction.
> > --
> > -------------------------------------------
> > Amazing PPT Hints, Tips and Tutorials
> >
> >
http://www.PPTAlchemy.co.uk
> >
http://www.technologytrish.co.uk
> > email john AT technologytrish.co.uk
> >
> >
> > "GL109" wrote:
> >
> > > Here's the VB code for the macro, does that help?
> > >
> > > Sub A()
> > > '
> > > ' Macro recorded 5/7/2008 by gmota
> > > '
> > >
> > > ActiveWindow.Selection.SlideRange.Shapes("Text Box 12").Select
> > > ActiveWindow.Selection.SlideRange.Shapes("Text Box 12").Select
> > >
> > > ActiveWindow.Selection.ShapeRange.TextFrame.TextRange.Characters(Start:=1,
> > > Length:=0).Select
> > > With ActiveWindow.Selection.TextRange
> > > .Text = "A"
> > > With .Font
> > > .Name = "Arial Narrow"
> > > .Size = 36
> > > .Bold = msoTrue
> > > .Italic = msoFalse
> > > .Underline = msoFalse
> > > .Shadow = msoFalse
> > > .Emboss = msoFalse
> > > .BaselineOffset = 0
> > > .AutoRotateNumbers = msoFalse
> > > .Color.SchemeColor = ppForeground
> > > End With
> > > End With
> > > End Sub
> > > Sub B()
> > > '
> > > ' Macro recorded 5/7/2008 by gmota
> > > '
> > >
> > > ActiveWindow.Selection.SlideRange.Shapes("Text Box 19").Select
> > > ActiveWindow.Selection.SlideRange.Shapes("Text Box 19").Select
> > >
> > > ActiveWindow.Selection.ShapeRange.TextFrame.TextRange.Characters(Start:=1,
> > > Length:=0).Select
> > > With ActiveWindow.Selection.TextRange
> > > .Text = "B"
> > > With .Font
> > > .Name = "Arial Narrow"
> > > .Size = 36
> > > .Bold = msoTrue
> > > .Italic = msoFalse
> > > .Underline = msoFalse
> > > .Shadow = msoFalse
> > > .Emboss = msoFalse
> > > .BaselineOffset = 0
> > > .AutoRotateNumbers = msoFalse
> > > .Color.SchemeColor = ppForeground
> > > End With
> > > End With
> > > ActiveWindow.Selection.SlideRange.Shapes("Text Box 13").Select
> > > ActiveWindow.Selection.SlideRange.Shapes("Text Box 13").Select
> > >
> > > ActiveWindow.Selection.ShapeRange.TextFrame.TextRange.Characters(Start:=1,
> > > Length:=0).Select
> > > With ActiveWindow.Selection.TextRange
> > > .Text = "B"
> > > With .Font
> > > .Name = "Arial Narrow"
> > > .Size = 36
> > > .Bold = msoTrue
> > > .Italic = msoFalse
> > > .Underline = msoFalse
> > > .Shadow = msoFalse
> > > .Emboss = msoFalse
> > > .BaselineOffset = 0
> > > .AutoRotateNumbers = msoFalse
> > > .Color.SchemeColor = ppForeground
> > > End With
> > > End With
> > > End Sub
> > > Sub C()
> > > '
> > > ' Macro recorded 5/7/2008 by gmota
> > > '
> > >
> > > ActiveWindow.Selection.SlideRange.Shapes("Text Box 17").Select
> > > ActiveWindow.Selection.SlideRange.Shapes("Text Box 17").Select
> > >
> > > ActiveWindow.Selection.ShapeRange.TextFrame.TextRange.Characters(Start:=1,
> > > Length:=0).Select
> > > With ActiveWindow.Selection.TextRange
> > > .Text = "C"
> > > With .Font
> > > .Name = "Arial Narrow"
> > > .Size = 36
> > > .Bold = msoTrue
> > > .Italic = msoFalse
> > > .Underline = msoFalse
> > > .Shadow = msoFalse
> > > .Emboss = msoFalse
> > > .BaselineOffset = 0
> > > .AutoRotateNumbers = msoFalse
> > > .Color.SchemeColor = ppForeground
> > > End With
> > > End With
> > > ActiveWindow.Selection.SlideRange.Shapes("Text Box 28").Select
> > > ActiveWindow.Selection.SlideRange.Shapes("Text Box 28").Select
> > >
> > > ActiveWindow.Selection.ShapeRange.TextFrame.TextRange.Characters(Start:=1,
> > > Length:=0).Select
> > > With ActiveWindow.Selection.TextRange
> > > .Text = "C"
> > > With .Font
> > > .Name = "Arial Narrow"
> > > .Size = 36
> > > .Bold = msoTrue
> > > .Italic = msoFalse
> > > .Underline = msoFalse
> > > .Shadow = msoFalse
> > > .Emboss = msoFalse
> > > .BaselineOffset = 0
> > > .AutoRotateNumbers = msoFalse
> > > .Color.SchemeColor = ppForeground
> > > End With
> > > End With
> > > End Sub
> > >
> > > "David M. Marcovitz" wrote:
> > >
> > > > Macros that work in Slide Show View tend to be much different from
> > > > macros that work in Normal/Edit view. For example, any code that
> > > > involves selecting (the kind of ugly code you get from the macro
> > > > recorder) will fail in Slide Show View. We'd have to see some code in
> > > > order to have any more of an idea of what is going wrong.
> > > > --David
> > > >
> > > > --
> > > > David M. Marcovitz
> > > > Microsoft PowerPoint MVP
> > > > Author of _Powerful PowerPoint for Educators_
> > > >
http://www.PowerfulPowerPoint.com/
> > > >
> > > > =?Utf-8?B?R0wxMDk=?= <GL109@discussions.microsoft.com> wrote in
> > > > news:76C16173-F6EC-47E9-894A-16FD198FD3AF@microsoft.com:
> > > >
> > > > > I am in the process of making a game for a meeting resembling Wheel of
> > > > > Fortune. I was planning on creating a macro for each of the letters of
> > > > > the alphabet so that when clicking on the letter it automatically
> > > > > poplulates the letter in the puzzle. The macro will run if i run it
> > > > > from clicking on tools/macro/macro and clicking run, but they won't
> > > > > work when i add them in the action setting for the slide show. I've
> > > > > tried both action buttons and just text and adding the new action
> > > > > setting so that on click it runs the macro, but they won't run. It
> > > > > underlines the text so i know it recognizes that there is an action
> > > > > associated with it, but when i click on it from the slideshow, it
> > > > > won't run. What am i doing wrong!?!?!
> > > > >
> > > > > I've also tried changing my security to low, but that doesn't make it
> > > > > work either. :(
> > > > >
> > > >
> > > >