Hi,
I am using Access vba to export all slides from a PowerPoint presentation, as jpg files, into a folder.
It does not work, because I am obviously making many syntax mistakes:
I need guidance here. Thank you.
I am using Access vba to export all slides from a PowerPoint presentation, as jpg files, into a folder.
It does not work, because I am obviously making many syntax mistakes:
Code:
Private Sub pptTest()
Dim objPresentation As PowerPoint.Presentation
Dim objSlide As PowerPoint.Slide
Dim strFileName As String
Dim j As Integer
Dim x As Integer
Dim mobjPPT As PowerPoint.Application
Set mobjPPT = New PowerPoint.Application
Set objPresentation = mobjPPT.Presentations.Open("C:\MyPowerPointPathAndName.pptm")
j = objPresentation.Slides.Count
If j > 0 Then
With objPresentation
For x = 1 To j
ActivePresentation.Slides(x).Export _
FileName:="MyFileName" & "str(x),jpg"
Next x
pptPres.Slides.Range.Delete
End With
End If
End Sub
I need guidance here. Thank you.