Solved

VBA to convert PowerPoint 2007 to 2003

Posted on 2011-02-28
2
707 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Preface: When I started this series, I used the term CommandBars because that is the Office Object class that it discusses. Unfortunately, when Microsoft introduced Office 2007, they replaced the standard Commandbar menus with "The Ribbon" and rem…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
The viewer will learn how to edit the master slide. They will also learn how to combine multiple themes into one master slide to use them in their presentation.

739 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