Powerful PowerPoint for Educators: Using Visual Basic for Applications to Make PowerPoint Interactive


homeButton.ActionSettings(ppMouseClick).Run = "StartAgain"


Download 1.37 Mb.
Pdf ko'rish
bet102/191
Sana08.05.2023
Hajmi1.37 Mb.
#1442581
1   ...   98   99   100   101   102   103   104   105   ...   191
Bog'liq
2.2. Powerful PowerPoint For Educators

homeButton.ActionSettings(ppMouseClick).Run = "StartAgain"
Set printButton = _
ActivePresentation.Slides(printableSlideNum).Shapes.AddShape _
(msoShapeActionButtonCustom, 200, 0, 150, 50)
printButton.TextFrame.TextRange.Text = "Print Re 
sults"
printButton.ActionSettings(ppMouseClick).Action = ppActionRunMacro
printButton.ActionSettings(ppMouseClick).Run = "PrintResults"
ActivePresentation.SlideShowWindow.View.Next
ActivePresentation.Saved = True
End Sub
Sub PrintResults() 'ADDED
ActivePresentation.PrintOptions.OutputType = ppPrintOutputSlides
ActivePresentation.PrintOut From:=printableSlideNum, _
To:=printableSlideNum
End Sub
Sub StartAgain() 'ADDED
ActivePresentation.SlideShowWindow.View.GotoSlide (1)
ActivePresentation.Slides(printableSlideNum).De 
lete
ActivePresentation.Saved = True
End Sub
The most important thing you need to know about this script is how to add
more ques tions. If you un derstand the explanation of the script be low, that is
great, and you will have a better abil ity to change aspects of the script. But if you
don’t un derstand the script, you can still add questions. Al most ev erything you
need to do to add questions is the same as in pre vious sections:
• You will need another
RightAnswer
and 
WrongAnswer
pro ce dure
for each new question. Note that in the earlier ex amples, for multi-
ple-choice ques 
tions, these pro 
cedures would be named
RightAnswer4
and 
WrongAnswer4
,
RightAnswer5
and
WrongAnswer5
, etc. In this ex ample our procedures are more specific
be cause the
answer1
,

Download 1.37 Mb.

Do'stlaringiz bilan baham:
1   ...   98   99   100   101   102   103   104   105   ...   191




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling