PowerPoint VBA Examples| Add new Presentation, slides and shuffle slides using VBA

preview_player
Показать описание
This video will deal with the use of PowerPoint VBA to create a new presentation, to add new slide at the end and also at the end of current Slide, to change the sldie position in slideshow mode.
=============================================================
If you find this video helpful then consider *SUBSCRIBING THE CHANNEL* and also to like the video and share it with your friends.
Time Stamps:
0:00 Intro
0:05 Saving the file in .pptm
0:28 Creating New Presentation
1:43 Adding new slide at the end of Presenatino
3:09 Adding Slide after current Slide
5:06 Changing the slide position
5:44 Outro

Scroll down to find the Source Code:

HOPE YOU LIKE THE VIDEO

WATCH OTHER VIDEO from the playlists from here
Watch other Excel VBA related video here:

Watch Power Point related video from here:

Watch Power Points Tips and tricks from here:

Here is the Source Code:
'1. to create a new presentation
Private Sub CommandButton1_Click()
Dim newpre As Presentation
Set newpre = Presentations.Add
End Sub

'2. To add a slide at the end of presentation
Private Sub CommandButton2_Click()
Dim slidecount As Long
Dim newslide As Slide
slidecount = ActivePresentation.Slides.Count
Set newslide = ActivePresentation.Slides.Add(slidecount + 1, ppLayoutBlank)
End Sub

'3. To add the slide after the current slide
Private Sub CommandButton3_Click()
Dim currentslideindex As Integer
Dim newslide As Slide
currentslideindex = Application.ActiveWindow.View.Slide.SlideIndex
setnewslide = ActivePresentation.Slides.Add(currentslideindex, 12)
End Sub
😊
Thanks for watching
Have a Nice Day!!
Рекомендации по теме
Комментарии
Автор

Here is the Source Code:
'1. to create a new presentation
Private Sub CommandButton1_Click()
Dim newpre As Presentation
Set newpre = Presentations.Add
newpre.SaveAs ("NewPowerPoint.pptx")
End Sub

'2. To add a slide at the end of presentation
Private Sub CommandButton2_Click()
Dim slidecount As Long
Dim newslide As Slide
slidecount =
Set newslide = + 1, ppLayoutBlank)
End Sub

'3. To add the slide after the current slide
Private Sub CommandButton3_Click()
Dim currentslideindex As Integer
Dim newslide As Slide
currentslideindex =
setnewslide = ActivePresentation.Slides.Add(currentslideindex, 12)
End Sub
😊

neoalltech
join shbcf.ru