What Bill said.
And also
Export slides as graphicshttp://
www.pptfaq.com/FAQ00022.htm
-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ:
www.pptfaq.com
PPTools:
www.pptools.com
================================================
Thanks so much for that! I'm still not able to get it to work though!
It will extract Slide1 of the Active Presentation and then stop. Here
is what I have:
Sub ForEachPresentation()
' Run a macro of your choosing on each presentation in a folder
Dim rayFileList() As String
Dim FolderPath As String
Dim FileSpec
Dim strTemp As String
Dim x As Long
' EDIT THESE to suit your situation
FolderPath = "Z:\Projects\2007\Microsoft\EETWC\Post Production\PPTX
\eetwcforum_07_29_07\Cascade\Fri - June 29\Moved to Podium\" ' Note:
MUST end in \
FileSpec = "*.pptx"
' END OF EDITS
' Fill the array with files that meet the spec above
ReDim rayFileList(1 To 1) As String
strTemp = Dir$(FolderPath & FileSpec)
While strTemp <> ""
rayFileList(UBound(rayFileList)) = FolderPath & strTemp
ReDim Preserve rayFileList(1 To UBound(rayFileList) + 1) As
String
strTemp = Dir
Wend
' array has one blank element at end - don't process it
' don't do anything if there's less than one element
If UBound(rayFileList) > 1 Then
For x = 1 To UBound(rayFileList) - 1
Call MyMacro(rayFileList(x))
Next x
End If
End Sub
And then in another module:
Sub MyMacro(strMyFile As String)
Dim ExportPath As String ' drive:\path to export to
Dim Pixwidth As Integer ' size in pixels of exported image
Dim Pixheight As Integer
Dim oSlide As Slide
' Edit to suit
Pixwidth = 1024
' Set height proportional to slide height
Pixheight = (Pixwidth *
ActivePresentation.PageSetup.SlideHeight) /
ActivePresentation.PageSetup.SlideWidth
ExportPath = ActivePresentation.Path & "\"
Set oSlide = ActiveWindow.View.Slide
With oSlide
.Export ExportPath & "Slide" & CStr(.SlideIndex) & ".JPG",
"JPG", Pixwidth, Pixheight
End With
End Sub
I debugged it and there was nothing wrong with it. What am I doing
wrong ?
Thank you!