Reputation: 1
Sub insert_zoom()
Dim pTargetSlide As slide, pNewSlide As slide _
, pLayout As CustomLayout _
, pShape As shape _
, i As Integer
With Application.ActivePresentation
Set pLayout = .Slides(1).CustomLayout
Set pTargetSlide = Application.ActiveWindow.View.slide
Set pNewSlide = .Slides.AddSlide(.Slides.Count + 1, pLayout)
End With
With pNewSlide
.Select
.Shapes.Paste
.SlideShowTransition.Hidden = msoTrue
End With
pTargetSlide.Select
Application.CommandBars.ExecuteMso "SlideZoomInsert"
For i = 1 To pNewSlide.SlideNumber - 1
SendKeys ("{RIGHT}")
Next i
SendKeys (" ~")
End Sub
Getting error in code line : Application.CommandBars.ExecuteMso "SlideZoomInsert"
error ref:
I have already added all sections to the slide, just need a code to insert summary slide.
need a VBA code to insert Summary slide: in the below manner:
I have tried this code:
Sub insert_zoom()
Dim pTargetSlide As slide, pNewSlide As slide _
, pLayout As CustomLayout _
, pShape As shape _
, i As Integer
With Application.ActivePresentation
Set pLayout = .Slides(1).CustomLayout
Set pTargetSlide = Application.ActiveWindow.View.slide
Set pNewSlide = .Slides.AddSlide(.Slides.Count + 1, pLayout)
End With
With pNewSlide
.Select
.Shapes.Paste
.SlideShowTransition.Hidden = msoTrue
End With
pTargetSlide.Select
Application.CommandBars.ExecuteMso "SlideZoomInsert"
Application.CommandBars.GetEnabledMso True
Application.CommandBars.ExecuteMso 1
For i = 1 To pNewSlide.SlideNumber - 1
SendKeys ("{RIGHT}")
Next i
SendKeys (" ~")
End Sub
I am trying to insert summary slide based on sections.
Upvotes: 0
Views: 106