VBA/Excel/Access/Word/PowerPoint/PowerPoint

Материал из VB Эксперт
Версия от 15:46, 26 мая 2010; Admin (обсуждение | вклад) (1 версия)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

Adding a Slide to a Presentation

   <source lang="vb">

Sub add()

   Dim mySlide As Slide
   Set mySlide = ActivePresentation.Slides.Add(Index:=1, _
       Layout:=ppLayoutTitle)

End Sub

</source>
   
  


Closing a Presentation

   <source lang="vb">

Sub close()

   ActivePresentation.Close

End Sub

</source>
   
  


To avoid the user being prompted, set the Saved property of the Presentation object to True before using the Close method-for example:

   <source lang="vb">

Sub save()

   With Presentations("Your PPT.ppt")
       .Saved = True
       .Close
   End With

End Sub

</source>