Solved

VBA to convert PowerPoint 2007 to 2003

Posted on 2011-02-28
2
706 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Background   Certain code in VBA requires initialization, such as application events. The app initialization is often triggered by the Auto_Open sub which is a special procedure that runs when an add-in loads. More significantly, this sub does n…
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 transitions to their Slideshows and how to set up timing for the transitions.
This video teaches viewers how to fit pictures into slides, crop and remove backgrounds, and alter photos to look more professional.

830 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