PowerPoint Macro for Mac - load pictures like "Insert Photo Album"

by user3264432   Last Updated July 12, 2019 02:12 AM - source

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


Related Questions




Language selection on creating new email in Outlook Mac?

Updated September 07, 2016 08:05 AM

AppleScript and Excel : only keep email on cells

Updated April 05, 2017 14:12 PM

How to fix «event coreslct» error?

Updated May 18, 2016 08:05 AM