Hi,
I am using VBA in Access to create a PowerPoint presentation using the data in the database. I have got this working adding new slides and formatting them but I would also like to add slides from an existing presentation. I have tried the code below but it is not inserting the slides and is also not giving me any error messages. Any ideas of where I have gone wrong?
I am using VBA in Access to create a PowerPoint presentation using the data in the database. I have got this working adding new slides and formatting them but I would also like to add slides from an existing presentation. I have tried the code below but it is not inserting the slides and is also not giving me any error messages. Any ideas of where I have gone wrong?
Code:
If (rs.Fields("song 8").Value) = "(none)" Then
ElseIf (rs.Fields("song 8").Value) = "PowerPoint slides 1" Then
'vvvvvvvvvvvvvvvvvvvvvvvv THIS BIT IS NOT WORKING vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
ActivePresentation.Slides.InsertFromFile _
"D:\AA - Test\Tester.pptx", 1, 2, 4
'^^^^^^^^^^^^^^^^^^^^^^^^ THIS BIT IS NOT WORKING ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Else
With .Slides.Add(rs.AbsolutePosition + 1, ppLayoutTitleOnly)
.FollowMasterBackground = False
.Background.Fill.Solid
.Background.Fill.ForeColor.RGB = RGB(0, 0, 0)
With .Shapes(1)
.Left = 100
.Top = -100
End With
With .Shapes(1).TextFrame.TextRange
.Text = "BLANK BETWEEN SONG 8 AND END"
End With
End With
End If