PowerPoint on the Mac doesn't have the Insert Photo Album functionality which allows you to select images and new PPT created with one image on each slide.
I have an old macro that does this on Windows—but Mac doesn't support Application.FileDialogue
How can I set this up to work on Mac?
Many thanks!
'This is the Windows code - won't work on Mac
Dim curSlide As Slide
Dim oPic As Shape
Dim Pres As Presentation
Dim picCount As Integer
Dim i As Integer
Dim fd As FileDialog
Set Pres = ActivePresentation
'Add selected pictures from directory
picCount = 1
Set fd = Application.FileDialog(msoFileDialogFilePicker)
With fd
.Title = "Select image files and click OK"
.Filters.Add "Images", "*.gif; *.jpg; *.jpeg; *.bmp; *.tif; *.png"
.FilterIndex = 2
If .Show = -1 Then
For i = 1 To .SelectedItems.Count
Set curSlide = ActivePresentation.Slides.Add(ActivePresentation.Slides.Count + 1, ppLayoutBlank)
Set oPic = curSlide.Shapes.AddPicture(FileName:=.SelectedItems(i), _
LinkToFile:=msoFalse, _
SaveWithDocument:=msoTrue, _
Left:=0, _
Top:=0, _
Width:=-1, _
Height:=-1)
Next i
End If
End With
Best Answer
I would forget your VBA based macro from PowerPoint for Windows and instead create a macOS service that you can user whenever you want, including directly from PowerPoint. To do this you will need to use Automator to create a service that runs an Apple Script.
Create a service using Automator
Now, replace the (* Your script goes here *) with the following script1:
Save the service using a meaningful name (e.g. Create PP Photo Album).
Now you should be able to run the service from any application, not just from within PowerPoint. You can do this by going to the Services list within any Application menu (e.g. PowerPoint > Services, Finder > Services, Safari > Services, TextEdit > Services, etc) and select the service you just created.
Notes:
1. This is an old script I adapted from one I found on the web some years ago for use with MS Office 2011. I do not recall offhand from where I obtained the original script, but I can vouch for the fact it still works with the latest version of MS PowerPoint.