Thanks very much for you help. I was able to combine the bits from both
examples to create the jpegs from each slide. The jpegs are saved in a folder
with the same name as the presentation, and as long as this folder exists,
then the jpgs are created correctly.
Sub GatherTitles()
On Error GoTo ErrorHandler
Dim oSlide As Slide
Dim strTitles As String
Dim strFilename As String
Dim PathSep As String
PathSep = "\"
strFilename = ActivePresentation.Path _
& PathSep _
& Mid$(ActivePresentation.Name, 1, Len(ActivePresentation.Name) - 4) _
& PathSep
On Error Resume Next ' in case there's no title placeholder on the slide
For Each oSlide In ActiveWindow.Presentation.Slides
strTitles = oSlide.Shapes.Title.TextFrame.TextRange.Text _
& ".jpg"
With oSlide
.Export strFilename & strTitles, "JPG"
End With
Next oSlide
On Error GoTo ErrorHandler
NormalExit:
Exit Sub
ErrorHandler:
MsgBox Err.Description
Resume NormalExit
End Sub