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


Download 1.37 Mb.
Pdf ko'rish
bet184/191
Sana08.05.2023
Hajmi1.37 Mb.
#1442581
1   ...   180   181   182   183   184   185   186   187   ...   191
Bog'liq
2.2. Powerful PowerPoint For Educators

GetNameEmailIdea
pro cedure, which simply
calls each of these pro cedures in turn. However,
GetNameEmailIdea
is not
tied directly to any but tons because when us ers press the but ton to say they want
to be your partner, all the magic hap pens (coordinated by the 
WorkTogether
procedure), not just the input part.
The
GoToWorkTogether
pro ce dure is sim ply a nav i ga tional pro ce dure
that goes to the tenth slide be cause that is the slide that con tains the mes sage
“Thank You For Learning About Me. Perhaps We Can Work To gether.” This,
by it self, could easily be done with traditional PowerPoint actions, but this is one
of many things that happens when a single but ton is pressed; that is, it is part of
all the things that 
WorkTogether
does.
The pro ce dure 
Save
simply saves the presentation (as de scribed in Chapter
8). This is simple, but it can’t be done by the user in Slide Show View without a
but ton and pro ce dure.
The
AddWorkTogetherSlide
procedure is the real workhorse. It cre ates
a slide like that shown in Fig ure 10.5.
180 Tem plates


Figure 10.5. Ex ample of Slide Cre ated When Some one Has Cho sen to Work with You
This slide will be in serted as the eleventh slide. The fol lowing line cre ates
the new slide:
ActivePresentation.Slides.Add in 
dex:=11, Lay 
out:=ppLayoutText
The
in 
dex:=11
en sures that the new slide will al ways be the eleventh
slide in the presentation. The
Lay 
out:=ppLayoutText
makes it a standard
text slide with a ti tle and one text area. Note that in earlier chapters pa rameters
for procedures and built-in functions were al ways con tained in parentheses.
As a general rule, VBA ex pects something to be re turned when the pa rame-
ters are in pa 
rentheses and noth 
ing to be returned when they are not.

Download 1.37 Mb.

Do'stlaringiz bilan baham:
1   ...   180   181   182   183   184   185   186   187   ...   191




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