macros does not run in pps

W

wrekinmachn

The following macros does not run after I save the presentation as a pps,
what gives?

Sub PrintablePage()
Set printableSlide =
ActivePresentation.Slides.Add(Index:=printableSlideNum, Layout:=ppLayoutText)
printableSlide.Shapes(1).TextFrame.TextRange.Text = "Assessment for " &
userName
printableSlide.Shapes(2).TextFrame.TextRange.Text = "Press the print
button to print your assessment and present to qualified trainer along with
your signed training record." & Chr$(13) & "You answered " & numCorrect & "
questions correctly in " & numIncorrect + numCorrect & " attempts."
Set printButton =
ActivePresentation.Slides(printableSlideNum).Shapes.AddShape(msoShapeActionButtonCustom, 200, 0, 150, 50)
printButton.TextFrame.TextRange.Text = "Print"
printButton.ActionSettings(ppMouseClick).Action = ppActionRunMacro
printButton.ActionSettings(ppMouseClick).Run = "PrintResults"
ActivePresentation.SlideShowWindow.View.Next
ActivePresentation.Saved = True
End Sub
 
J

John Wilson

There is no difference between pps and ppt files

Are you trying to run it in the viewer or on another computer with higher
macro security?
 
D

David M. Marcovitz

What Steve and John have said and ...

If you do have a problem with your file associations, check out:

Changing a File Association, Repairing broken File Associations
http://www.pptfaq.com/FAQ00355.htm

It might be that on your computer .ppt files open in PowerPoint, but .pps
files open in PowerPoint Viewer (which won't run macros). A .pps file is
exactly the same as a .ppt file, but if Windows thinks it should run in
the Viewer, then you will have a problem.

--David

--
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/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top