Solved

VBA to convert PowerPoint 2007 to 2003

Posted on 2011-02-28
2
702 Views
Last Modified: 2012-05-11
Hi,

I have a number of PowerPoint 2007 files in a directory, and would like to set up a VBA macro that converts them into PowerPoint 2003 files. But I can't find the code to do this. Here's where I've got to so far. The ppPowerPoint8 does not seem to work, although the Excel equivalent, xlExcel8, does.

Sub Convert2003()

a = MsgBox("Please browse to the relevant folder holding your .PPTX files", vbOKOnly, "Browse")
Set userDir = Application.FileDialog(msoFileDialogFolderPicker)
   
With userDir
    .Show
    'On Error GoTo here
    FolderName = .SelectedItems(1) & "\"
End With
    ChDrive FolderName
    ChDir FolderName
    fnames = Dir("*template phase 2.pptx")
    'determine the type of files we are going to be working with...
    Do While fnames <> ""
        Presentations.Open FileName:=fnames
        'save workbook in Ppt 2003 format
    Presentations(fnames).SaveAs FileName:=Left(fnames, Len(fnames) - 5), FileFormat:=ppPowerPoint8
               
    'close saved workbook
    Presentations(fnames).Close
    'loop to next file
        fnames = Dir()
    Loop
Exit Sub
'here:
End Sub
0
Comment
Question by:Tracey_Hill
2 Comments
 
LVL 59

Accepted Solution

by:
Chris Bottomley earned 250 total points
ID: 34996552
It ought to save as 97-2003 if you simply use:

Presentations(fnames).SaveAs FileName:=Left(fnames, Len(fnames) - 5) & ".ppt"

Chris
0
 

Author Comment

by:Tracey_Hill
ID: 34996871
Yes that worked. Thanks!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many programs have tried to outwit PowerPoint in terms of technology and skill. These programs, however, still lack several characteristics that PowerPoint has possessed from the start. Here's why PowerPoint replacements won't entirely work for desi…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This video teaches viewers how to add simple and professional themes to their slides.
This video teaches viewers how to create handouts from their slides and helps them decide how many slides to include per handout.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now