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


"Ques  tion 2: " & answer2 & Chr$(13) &


Download 1.37 Mb.
Pdf ko'rish
bet105/191
Sana08.05.2023
Hajmi1.37 Mb.
#1442581
1   ...   101   102   103   104   105   106   107   108   ...   191
Bog'liq
2.2. Powerful PowerPoint For Educators

"Ques 
tion 2: " & answer2 & Chr$(13) & _
"Ques 
tion 3: " & answer3 & Chr$(13) & _
"You got " & numCorrect & " out of " & _
numCorrect + numIncorrect & "." & Chr$(13) & _
"Press the Print Re 
sults but 
ton to print your an 
swers."
printableSlide.Shapes(1)
re 
fers to the title area of the slide, and
printableSlide.Shapes(2)
re fers to the bulleted list area of the slide. Note
that if you have sev eral questions, you might want to play with for matting the
display of your an 
swers, possibly us 
ing a two-column text slide
(
ppLayoutTwoColumnText
in stead of 
ppLayoutText
and putt ing some text
in shape 2 and other text in shape 3) or adjusting the font size of the text area by
putting the following line af ter the above code:
printableSlide.Shapes(2).TextFrame.TextRange.Font.Size = 9
9 is the size of the font, so you can choose a dif ferent number for a smaller or
larger font. Note that some versions of PowerPoint (2002 and above) au tomati-
cally change the font size for you so your text fits the text box. How ever, if you
use those versions, you might con sider changing the font your self in case your
presentation is used with an earlier ver sion of PowerPoint.
Next we need to add but tons to our new slide. The following line adds a
custom but ton in the top left of the screen (coordinates 0,0) that is 150 pix els
wide and 50 pix els tall. A custom but ton has no icon in it.
How Did You Do: Re porting Results to the Teacher 107


Set homeButton = _
ActivePresentation.Slides(printableSlideNum).Shapes.AddShape _
(msoShapeActionButtonCustom, 0, 0, 150, 50)
Because we stored the but ton in the vari able
homeButton
, we can use that
variable to change the at tributes of the button. We need to put some text in the
button. The text “Start Again” will appear in the button:

Download 1.37 Mb.

Do'stlaringiz bilan baham:
1   ...   101   102   103   104   105   106   107   108   ...   191




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