T
tangotom
I have a large PPT 2007 presentation that was put together without
using a master. I now want to add a custom footer using vba. I can
come close using code from a PPT 2003 macro, but the "apply to all
slides" part in the 2003 code doesn't work in PPT 2007. Here is the
2003 code that comes close:
If ActivePresentation.HasTitleMaster Then
With ActivePresentation.TitleMaster.HeadersFooters
With .DateAndTime
.Format = ppDateTimeMdyy
.Text = "CONFIDENTIAL"
.UseFormat = msoFalse
.Visible = msoTrue
End With
With .Footer
.Text = "my custom text"
.Visible = msoTrue
End With
.SlideNumber.Visible = msoTrue
End With
End If
With ActivePresentation.SlideMaster.HeadersFooters
With .DateAndTime
.Format = ppDateTimeMdyy
.Text = "CONFIDENTIAL"
.UseFormat = msoFalse
.Visible = msoTrue
End With
With .Footer
.Text = "my custom text"
.Visible = msoTrue
End With
.SlideNumber.Visible = msoTrue
.DisplayOnTitleSlide = msoFalse
End With
With ActivePresentation.Slides.Range.HeadersFooters
With .DateAndTime
.Format = ppDateTimeMdyy
.Text = "CONFIDENTIAL"
.UseFormat = msoFalse
.Visible = msoTrue
End With
With .Footer
.Text = "my custom text"
.Visible = msoTrue
End With
.SlideNumber.Visible = msoTrue
End With
It is that last chunk of code that should do the work of applying the
edits made to Title Master and Slide Master to all the slides.
Unfortunately, the first line of that chunk generates an error in PPT
2007.
Can someone please let me know what the correct object syntax would
be?
Thanks.
using a master. I now want to add a custom footer using vba. I can
come close using code from a PPT 2003 macro, but the "apply to all
slides" part in the 2003 code doesn't work in PPT 2007. Here is the
2003 code that comes close:
If ActivePresentation.HasTitleMaster Then
With ActivePresentation.TitleMaster.HeadersFooters
With .DateAndTime
.Format = ppDateTimeMdyy
.Text = "CONFIDENTIAL"
.UseFormat = msoFalse
.Visible = msoTrue
End With
With .Footer
.Text = "my custom text"
.Visible = msoTrue
End With
.SlideNumber.Visible = msoTrue
End With
End If
With ActivePresentation.SlideMaster.HeadersFooters
With .DateAndTime
.Format = ppDateTimeMdyy
.Text = "CONFIDENTIAL"
.UseFormat = msoFalse
.Visible = msoTrue
End With
With .Footer
.Text = "my custom text"
.Visible = msoTrue
End With
.SlideNumber.Visible = msoTrue
.DisplayOnTitleSlide = msoFalse
End With
With ActivePresentation.Slides.Range.HeadersFooters
With .DateAndTime
.Format = ppDateTimeMdyy
.Text = "CONFIDENTIAL"
.UseFormat = msoFalse
.Visible = msoTrue
End With
With .Footer
.Text = "my custom text"
.Visible = msoTrue
End With
.SlideNumber.Visible = msoTrue
End With
It is that last chunk of code that should do the work of applying the
edits made to Title Master and Slide Master to all the slides.
Unfortunately, the first line of that chunk generates an error in PPT
2007.
Can someone please let me know what the correct object syntax would
be?
Thanks.