Print name on final slide

P

Project Org

I have a quiz in Powerpoint set up. Each slide has # wrong, # correct, and
the total score. These totals are setup on the master slide. The last slide
is set up to print with these totals. This is working fine.
My problem is getting the last slide to print the persons name. Using the
code examples I found on this site I can get it to prompt for a name but not
to print the persons name. I am using this last slide as a certificate for
completing the program.
Any suggestions?
 
D

David M. Marcovitz

It sounds like you might have used some of my examples. You might look at
Example 7.9 at my site:

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

Basically, when you ask the user for a name, you store it in a variable (in
my examples, I call it userName). You can use this variable to change the
text on your certificate. If you have a separate textbox for the person's
name, perhaps shape 7 on your slide (perhaps, slide 23), you could do
something like:

ActivePresentation.Slides(23).Shapes(7).TextFrame.TextRange.Text = userName

Holler back if this doesn't make sense.

--David

David Marcovitz
Author of _Powerful PowerPoint for Educators_
http://www.loyola.edu/education/PowerfulPowerPoint/
 
P

Project Org

The scoring that I have on my powerpoint was set up by someone else. When I
try to use your examples, the "two" do not want to work together. Basically I
believe I am over my head here. I am going to buy the book..Thank you for
your help.
 
D

David M. Marcovitz

I'm glad you're interested in the book. You might be over your head for
now, but you'll catch on. Without actually seeing the other person's
code, it is hard to tell exactly what you need to do to put the name on
the slide. It's not very hard...if you know what you're doing. If you
copy your code here, someone might be able to figure out how to do what
want in the context of your code.
--David

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

Project Org

Any help is appreciated.

Below is the code for the test that I have on my powerpoint now. The scoring
is setup on the master so on each slide the person can see their scoring as
they proceed. When I try to put in the code to prompt for the username - the
code given in this post, the prompt works but then whenever the Begin button
on the first slide is clicked it will not advance and the values for the test
do not reset to zero.

The username should appear on the last slide to print as a certificate.
(This includes their scoring.)

Sub Begin()
SlideMaster.CorrectBox.Value = 0
SlideMaster.WrongBox.Value = 0
SlideMaster.ScoreBox.Value = 0
SlideMaster.AnswersBox.Value = 0
SlideShowWindows(1).View.GotoSlide 2
End Sub


Sub Rightanswer()
SlideMaster.CorrectBox.Value = SlideMaster.CorrectBox.Value + 1
SlideMaster.AnswersBox.Value = SlideMaster.AnswersBox.Value + 1
SlideMaster.ScoreBox.Value = Round(SlideMaster.CorrectBox.Value /
SlideMaster.AnswersBox.Value * 100, 2)
SlideShowWindows(1).View.Next
End Sub

Sub Wronganswer()
SlideMaster.WrongBox.Value = SlideMaster.WrongBox.Value + 1
SlideMaster.AnswersBox.Value = SlideMaster.AnswersBox.Value + 1
SlideMaster.ScoreBox.Value = Round(SlideMaster.CorrectBox.Value /
SlideMaster.AnswersBox.Value * 100, 2)
MsgBox "Incorrect. Try again."
End Sub

Sub PrintResults()

ActivePresentation.PrintOptions.OutputType = ppPrintOutputSlides
ActivePresentation.PrintOut From:=3, To:=3
ActivePresentation.SlideShowWindow.View.Exit

End Sub
 
D

David M. Marcovitz

This is good, but you did not include the code for getting the user's
name. Since that is where the problem is and you didn't include that, I'm
not sure why that code isn't working.
--David

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

Any help is appreciated.

Below is the code for the test that I have on my powerpoint now. The
scoring is setup on the master so on each slide the person can see
their scoring as they proceed. When I try to put in the code to prompt
for the username - the code given in this post, the prompt works but
then whenever the Begin button on the first slide is clicked it will
not advance and the values for the test do not reset to zero.

The username should appear on the last slide to print as a
certificate. (This includes their scoring.)

Sub Begin()
SlideMaster.CorrectBox.Value = 0
SlideMaster.WrongBox.Value = 0
SlideMaster.ScoreBox.Value = 0
SlideMaster.AnswersBox.Value = 0
SlideShowWindows(1).View.GotoSlide 2
End Sub


Sub Rightanswer()
SlideMaster.CorrectBox.Value = SlideMaster.CorrectBox.Value + 1
SlideMaster.AnswersBox.Value = SlideMaster.AnswersBox.Value + 1
SlideMaster.ScoreBox.Value = Round(SlideMaster.CorrectBox.Value /
SlideMaster.AnswersBox.Value * 100, 2)
SlideShowWindows(1).View.Next
End Sub

Sub Wronganswer()
SlideMaster.WrongBox.Value = SlideMaster.WrongBox.Value + 1
SlideMaster.AnswersBox.Value = SlideMaster.AnswersBox.Value + 1
SlideMaster.ScoreBox.Value = Round(SlideMaster.CorrectBox.Value /
SlideMaster.AnswersBox.Value * 100, 2)
MsgBox "Incorrect. Try again."
End Sub

Sub PrintResults()

ActivePresentation.PrintOptions.OutputType = ppPrintOutputSlides
ActivePresentation.PrintOut From:=3, To:=3
ActivePresentation.SlideShowWindow.View.Exit

End Sub
 

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