Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General PowerPoint Questions / July 2007

Tip: Looking for answers? Try searching our database.

Macro runs in PowerPoint but not in SlideShow View - Help please

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MelissaC - 10 Jul 2007 14:58 GMT
I am trying to create a presentation with multiple buttons that will show
different data point on a map when selected.  The macro I created works fine
in PPT but not in Slideshow View.  After reviewing additional posts with this
issue I understand why it doesn't work (selection in code which can't be done
in slide show view) but I don't understand how to fix it.   Below is simply
code I created by recoding a macro,(I am by no means a programmer) that
creates a text box with a number in it.  That's it.  Thanks

Sub number()
'
' Macro recorded 7/10/2007 by Melissa
'

   
ActiveWindow.Selection.SlideRange.Shapes.AddTextbox(msoTextOrientationHorizontal, 162, 78, 54, 28.875).Select
   ActiveWindow.Selection.ShapeRange.TextFrame.WordWrap = msoTrue
   With ActiveWindow.Selection.TextRange.ParagraphFormat
       .LineRuleWithin = msoTrue
       .SpaceWithin = 1
       .LineRuleBefore = msoTrue
       .SpaceBefore = 0.5
       .LineRuleAfter = msoTrue
       .SpaceAfter = 0
   End With
   
ActiveWindow.Selection.ShapeRange.TextFrame.TextRange.Characters(Start:=1,
Length:=0).Select
   With ActiveWindow.Selection.TextRange
       .Text = "1"
       With .Font
           .Name = "Arial"
           .Size = 18
           .Bold = msoFalse
           .Italic = msoFalse
           .Underline = msoFalse
           .Shadow = msoFalse
           .Emboss = msoFalse
           .BaselineOffset = 0
           .AutoRotateNumbers = msoFalse
           .Color.SchemeColor = ppForeground
       End With
   End With
End Sub
David M. Marcovitz - 10 Jul 2007 16:09 GMT
Don't you know that if you post the code you have it makes it too easy?
Give us a challenge. Make us read your mind. Ok. Just kidding. Thanks for
posting what you have. This should fix your problem:

Sub GoodNumber()
Dim myTextBox As Shape
   
Set myTextBox = _
   ActivePresentation.SlideShowWindow.View.Slide.Shapes _
   .AddTextbox(msoTextOrientationHorizontal, 162, 78, 54, 28.875)
   myTextBox.TextFrame.WordWrap = msoTrue
   With myTextBox.TextFrame.TextRange.ParagraphFormat
       .LineRuleWithin = msoTrue
       .SpaceWithin = 1
       .LineRuleBefore = msoTrue
       .SpaceBefore = 0.5
       .LineRuleAfter = msoTrue
       .SpaceAfter = 0
   End With
   With myTextBox.TextFrame.TextRange
       .Text = "1"
       With .Font
           .Name = "Arial"
           .Size = 18
           .Bold = msoFalse
           .Italic = msoFalse
           .Underline = msoFalse
           .Shadow = msoFalse
           .Emboss = msoFalse
           .BaselineOffset = 0
           .AutoRotateNumbers = msoFalse
           .Color.SchemeColor = ppForeground
       End With
       
   End With
End Sub

Signature

David M. Marcovitz
Microsoft PowerPoint MVP
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/

> I am trying to create a presentation with multiple buttons that will
> show different data point on a map when selected.  The macro I created
[quoted text clipped - 41 lines]
>     End With
> End Sub
MelissaC - 10 Jul 2007 19:10 GMT
I figured if I was going to recieve help I had to make my query as easy as
possible to understand.  And it works!!!

Thank you so much!

> Don't you know that if you post the code you have it makes it too easy?
> Give us a challenge. Make us read your mind. Ok. Just kidding. Thanks for
[quoted text clipped - 78 lines]
> >     End With
> > End Sub
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.