Hi
try this macro
in the visual basic area, ensure ensure tools > references > powerpoint object library is selected so you can run PowerPoint code from excel
Sub powerpoint_export()
'ensure tools > references > powerpoint object library is selected
Dim PPApp As PowerPoint.Application
Dim PPPres As PowerPoint.Presentation
Dim Ws As Worksheet, Sn As Long, Wsheet As Worksheet, sw As Long, sh As Long, st As Long
Set PPApp = CreateObject("Powerpoint.Application")
PPApp.Visible = True
Set PPPres = PPApp.Presentations.Add
PPPres.ApplyTemplate "\\Company Name\Division\Department\ProjectReviewPresentation.PPT "
sw = PPPres.PageSetup.SlideWidth - 36
sh = PPPres.PageSetup.SlideHeight - 6
Sn = 1
For Each Ws In ActiveWorkbook.Worksheets
sh = PPPres.PageSetup.SlideHeight - 6
Ws.Range(Ws.PageSetup.PrintArea).CopyPicture
PPPres.Slides.Add Sn, ppLayoutTitleOnly
With PPPres.Slides(Sn).Shapes(1).TextFrame.TextRange
.Text = Ws.Name
.Font.Size = 40
.Font.Name = "Arial"
End With
PPPres.Slides(Sn).Shapes.Paste
st = PPPres.Slides(Sn).Shapes(1).Top + PPPres.Slides(Sn).Shapes(1).Height + 6
sh = sh - st
'size to fill slide area below heading
PPPres.Slides(Sn).Shapes(2).LockAspectRatio = msoTrue
PPPres.Slides(Sn).Shapes(2).Width = sw
If PPPres.Slides(Sn).Shapes(2).Height > sh Then PPPres.Slides(Sn).Shapes(2).Height = sh
PPPres.Slides(Sn).Shapes(2).Top = st
PPPres.Slides(Sn).Shapes.Range(2).Align msoAlignCenters, msoCTrue
Sn = 1 + Sn
Next Ws
PPApp.WindowState = ppWindowMaximized
End Sub
Bookmarks