Hi all,

I have a bit of a problem with some code that works fine in PowerPoint 2003, but needs to run in 2007 as well.

A little background: This is part of an entry setup for any new Corporate PowerPoint presentations. The process creates a new presentation from a particular template, asks the user to select a security level from a drop-down, and then sets up a footer, using the selected classification, and any copyright details that go with it. This runs as part of an add-in. The example code below is the part that causes the error:

[VBA]Sub Header()

With ActivePresentation.SlideMaster.HeadersFooters
With .DateAndTime
.Format = ppDateTimeMdyy
.Text = ""
.UseFormat = msoFalse
.Visible = msoFalse
End With
With .Footer
.Text = "Test one"
.Visible = msoTrue
End With
.SlideNumber.Visible = msoTrue
End With

With ActivePresentation.Slides.Range.HeadersFooters
With .DateAndTime
.Format = ppDateTimeMdyy
.Text = ""
.UseFormat = msoFalse
.Visible = msoFalse
End With
With .Footer
.Text = "Test two"
.Visible = msoTrue
End With
.SlideNumber.Visible = msoTrue
End With
End Sub[/VBA]

In PowerPoint 2007, it errors on the 'Range' of the second part. Runs fine in 2003. It seems to not understand the range and the difference in slide masters. Writing it out prompts me with all of the right list properties. Also, the .Visible property is ignored and the 2007 check is not made active. Any advice would be most appreciated.