potm to pot (but one of vba doesn't work)

Robie
5StarLounger
Posts: 656
Joined: 18 Feb 2010, 14:26

potm to pot (but one of vba doesn't work)

Post by Robie »

I created a 2010 PP presentation potm file and also a .ppam from it.

I then *saved* the .potm as .pot (for use by the Office 2003 users).

Both, the .pot and .potm work perfectly under Office 2010. :0)

But, .pot under Office 2003, fails :-(.
It fails at the point where the code is trying to switch to

Code: Select all

ActiveWindow.ViewType = ppViewTitleMaster
. The error message says 'Title master not found'.
Don't understand why.
37.png
Any ideas would be helpful.
Thanks.

Robie
You do not have the required permissions to view the files attached to this post.

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

Re: potm to pot (but one of vba doesn't work)

Post by HansV »

Starting with PowerPoint 2007, a presentation may contain many more master slides. Perhaps the master slides in your template are incompatible with PowerPoint 2003?
By the way, why do you want to switch to a master slide in your macro?
Best wishes,
Hans

Robie
5StarLounger
Posts: 656
Joined: 18 Feb 2010, 14:26

Re: potm to pot (but one of vba doesn't work)

Post by Robie »

HansV wrote:Starting with PowerPoint 2007, a presentation may contain many more master slides. Perhaps the master slides in your template are incompatible with PowerPoint 2003?
By the way, why do you want to switch to a master slide in your macro?
Thanks for the comeback.

I want to switch to master slide to change the backdrop image (could be 1 of 6 different ones with only *one* displayed at a time). Other images are in bacground and the selected image is put in foreground.
The code looks as follows:

Code: Select all

Function ChangeFIImage(selectedimage As Integer)
'
' Macro recorded 11/05/2011 by raj.patel
'
    Dim i As Integer
    Dim sname As String
    Dim vSavedViewType As Variant
    
    On Error GoTo errorcontrol
    vSavedViewType = ActiveWindow.ViewType
    ActiveWindow.ViewType = ppViewTitleMaster
    For i = 1 To 6
        sname = "TitleMasterFi" + Split(nameindex, ";")(i)
        ActivePresentation.TitleMaster.Shapes(sname).Select
        If i = selectedimage Then
            ActiveWindow.Selection.ShapeRange.ZOrder msoBringToFront
        Else
            ActiveWindow.Selection.ShapeRange.ZOrder msoSendToBack
        End If
    Next i
    ActiveWindow.ViewType = vSavedViewType
    Exit Function
errorcontrol:
    MsgBox ("Error:= " & Err.Number & vbCr & "Message= " & Err.Description)
    ActiveWindow.ViewType = vSavedViewType
    MsgBox (ActivePresentation.TitleMaster.Shapes.Count)
End Function

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

Re: potm to pot (but one of vba doesn't work)

Post by HansV »

I think it'd be best to design the templates in PowerPoint 2003 and see if they still work in 2010 (that's more likely than the other way round).
Best wishes,
Hans