Here is the code I am currently working with. I have tried to tie in the example you gave, but it errors on the 'Set osld =' line.
Sub InsertAviationslide()
Dim oView As View
Dim osld As Slide
With ActivePresentation.Slides
Set oView = ActiveWindow.View
oView.gotoslide .Add(oView.Slide.SlideIndex + 1, _
ppLayoutTitleOnly).SlideIndex
Set oView = Nothing
End With
Set osld = ActivePresentation.Slides.Add(oView.Slide.SlideIndex + 1, ppLayoutTitleOnly).SlideIndex
osld.Design = ActivePresentation.Designs("Aviation")
'Now add a new text slide for this divider
With ActivePresentation.Slides
Set oView = ActiveWindow.View
oView.gotoslide .Add(oView.Slide.SlideIndex + 1, _
ppLayoutTitleOnly).SlideIndex
Set oView = Nothing
End With
End Sub
The key points I'm trying to achieve are: Insert directly after the current slide, which will be in normal view, add the title slide and assign the correct master by name, and then add another slide that will be a standard text slide using the same master. [Which is a default action anyway.]
EDIT: I can see why! Will amend it.