Opening a PowerPoint Show file for editing

BigKev
StarLounger
Posts: 78
Joined: 10 Feb 2010, 12:54
Location: Jeddah, Saudi Arabia

Opening a PowerPoint Show file for editing

Post by BigKev »

This code works for Office 2010 but there is no reason why it shouldn't work for 2003 and 2007.

Assuming you don't have the original editable file then if you want to open a PowerPoint Show (.pps or .ppsx) file for editing, create a new blank presentation, in the VBE add a module and paste the code below. Change the file name as you like and run it.

Code: Select all

Sub OpenShowFileForEdit()

On Error GoTo ErrHandle

Dim pShow As Presentation

' Lock the window to prevent refreshing

   ScreenUpdating = False

'Open the show, however use additional flag - WithWindow set to FALSE

   Set pShow = Presentations.Open("K:\Presentation.pps", WithWindow:=msoFalse)

'Open a window now to the presentation for editing

   pShow.NewWindow

' Unlock the window to start refreshing again

   ScreenUpdating = True
   Exit Sub

ErrHandle:
    If Err.Number <> 0 Then
        MsgBox Err.Number & " " & Err.Description, _
               vbCritical + vbOKOnly, "Error"
    End If

End Sub




User avatar
HansV
Administrator
Posts: 78481
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Opening a PowerPoint Show file for editing

Post by HansV »

Thanks. ScreenUpdating is not available in PowerPoint 2007 (and I assume in earlier versions).

Here is a version that works in 2007 and that prompts the user for a PowerPoint Show:

Code: Select all

Sub OpenShowFileForEdit()
    Dim pShow As Presentation
    Dim strFile As String
    On Error GoTo ErrHandle

    With Application.FileDialog(msoFileDialogOpen)
        .Filters.Clear
        .Filters.Add "PowerPoint Shows", "*.pps*"
        If .Show Then
            strFile = .SelectedItems(1)
        Else
            MsgBox "No PowerPoint Show selected.", vbInformation
            Exit Sub
        End If
    End With
    'Open the show, however use additional flag - WithWindow set to FALSE
    Set pShow = Presentations.Open(strFile, WithWindow:=msoFalse)

    'Open a window now to the presentation for editing
    pShow.NewWindow
    Exit Sub

ErrHandle:
    If Err.Number <> 0 Then
        MsgBox Err.Number & " " & Err.Description, _
               vbCritical + vbOKOnly, "Error"
    End If
End Sub
Best wishes,
Hans

User avatar
StuartR
Administrator
Posts: 12605
Joined: 16 Jan 2010, 15:49
Location: London, Europe

Re: Opening a PowerPoint Show file for editing

Post by StuartR »

I usually just rename the file from .PPS to .PPT.
Has something changed to make this no longer effective?
StuartR


User avatar
HansV
Administrator
Posts: 78481
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Opening a PowerPoint Show file for editing

Post by HansV »

I remember doing that for .pps files. But renaming .ppsx to .pptx doesn't work in Excel 2007:
x458.jpg
You do not have the required permissions to view the files attached to this post.
Best wishes,
Hans