ActivePresentation.Saved
to
True
, the stu -
dents won’t be asked.
For the cases where you want to save a presentation, you can use the
Save
procedure above. As long as the place where the presentation is run ning is a lo -
cation that can be saved (un locked disk, network folder where the user has write
priv i leges, etc.),
Save
will save the presentation without the user even know ing
(unless it is saving something to a slow de vice like a floppy disk, in which case it
might take a few seconds to save). You would use this (or simply the line
ActivePresentation.Save
) im me di ately af ter do ing some thing that you
want saved. An ex ample of this can be found in Chapter 10:
Sub WorkTogether()
GetNameEmailIdea
GoToWorkTogether
AddWorkTogetherSlide
Save
End Sub
In this ex am ple, in for ma tion is col lected (us ing the
GetNameEmailIdea
pro ce-
dure), the presentation jumps to another slide (using the
GoToWorkTogether
procedure), and a new slide is added to the presentation (using the
AddWorkTogetherSlide
pro cedure, which is where the pre sentation be comes
dirty). Fi nally, the presentation is saved (us ing the
Save
pro cedure). The saving
happens automatically without the user’s knowl edge. Of course, the
Save
pro -
cedure from above must be in cluded in your VBA module.
Finally, you might want to quit the presentation (possibly when a user
presses an Exit but ton). If you weren’t worried about saving, you could simply
hyperlink a but ton to End Show (us ing traditional PowerPoint and no VBA). If
you are wor ried about saving, you will need something like the last two pro ce-
dures.
Quit
will quit the pre sentation without saving and without asking the
user whether or not to save. Be careful with this. If you are trying out your
Quit
procedure while you are creating your presentation and you haven’t saved, your
changes will be lost. This in cludes changes to your VBA code. Therefore, you
should always save your presentation before trying it out.
Do'stlaringiz bilan baham: |