PDA

View Full Version : Help: How to automatically export first slide PPT, POT to JPG



yurble_vn
04-08-2008, 09:46 PM
Dear All,

As you should agree with me that PPT template play an importance role in PP.

Along the way of surfing net, I have collect a small library of PPT. But to utilize it, I have to check one by one to select the most suitable template. And it is huge time comsumption.

Please:
1. Is there anyway to automatics export all PPT or POT first pages to jpg file. SO we can use photo managing software to select.

2. I have tried to use VBA to export, and it is okie with a single file. My sticking is: how to do it with all files store in a folder?

Thanks for your help

John Wilson
04-09-2008, 03:23 AM
If you go to www.pptfaq.com (http://www.pptfaq.com) in the programming section there are examples of how to work with all presentations in a folder.

Surely though if you view the folder in thumbnail view you will see the first slide image?

yurble_vn
04-09-2008, 08:17 AM
Thanks John,
For your understanding why I try to export to image: the thumbnail view in window is default small. You can not get the idea of the template. Further more. It really slow down the systems.

thanks for the link

yurble_vn
04-09-2008, 09:03 AM
Dear All,

I have collected and do follow code. The work accross all file is working file.

BUt know I'm facing the execution code on each folder.

the error message recieved is:


Run-time error' -2147467259 (80004005)':
Presentation (unknown member): the Path or file name for G:\c-CommonProgramResoucre\1.Templates\Presentation Templates\1.Them Gallery Powerpoint tools\Template\cdb2004100l.pot.jpg is invalid. Please check that the phat and file name are correct

Please help

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
Dim oPresentation As Presentation



' EDIT THESE to suit your situation
FolderPath = ActivePresentation.Path & "\"
FileSpec = "*.pot"
' END OF EDITS

' Fill the array with files that meet the spec above
ReDim rayFileList(1 To 1) As String
strTemp = Dir$(FolderPath & FileSpec)
MsgBox FolderPath
While strTemp <> ""

Set oPresentation = Presentations.Open(FolderPath & strTemp)
With oPresentation

.SaveAs FileName:=FolderPath & strTemp & ".jpg", FileFormat:=ppSaveAsJPG, EmbedTrueTypeFonts:=msoFalse

End With

oPresentation.Close
strTemp = Dir
Wend
End Sub