Hi,

I have a problem that I have spent hours and hours on and can't find a solution for.

PROBLEM:
I want to create a VBA script that saves the current slide in a slideshow as a PDF, JPG AND PPTX and the code has to run on windows and MAC.
I am currently using PowerPoint 2016 on both machines.

This code for creating the PDF and JPG works on windows but not on a Mac:

#If Mac Then
sep = ":"
#Else
sep = ""
#End If

ActivePresentation.ExportAsFixedFormat _
ActivePresentation.Path & sep & ActivePresentation.Name & ".pdf", _
ppFixedFormatTypePDF, _
ppFixedFormatIntentPrint, , , , , , ppPrintCurrent

ActivePresentation.ExportAsFixedFormat _
ActivePresentation.Path & sep & ActivePresentation.Name & ".jpg", _
ppFixedFormatTypePDF, _
ppFixedFormatIntentPrint, , , , , , ppPrintCurrent


This code creates a PPT but crashes PowerPoint everytime:

'ActivePresentation.Slides(ActivePresentation.SlideShowWindow.View.Slide.Sl ideIndex) _
.Export ActivePresentation.Path & sep & "Single Slide.ppt", _
"PPT"


I am a novice and any help would be greatly appreciated.

Thanks