Problem with footer


U

Ulrik

Hi all,

I have a strange problem with Apply Footer in code.

The problem arises when a the user pastes in slides from another
presentation (which is based on the template) The footer has another text
than the receiveing presentation.

The problem is when I with code simulate "Apply to all " the footer does not
change on the inserted slides.

I have tried different approaches incl. the standard one, that you get when
recording a macro. That doesn't work neither the footers are still
unchanged.

If I do change the footer manually AKA - View Header And Footer (Apply To
All) it works like a charm.

Version Office 2003 sp3 (english us)

Is this a PowerPoint bug?

Code as follows:
=============================

If ActivePresentation.HasTitleMaster Then
With ActivePresentation.TitleMaster.HeadersFooters
With .Footer
.Text = "test"
.Visible = msoTrue
End With
End With
End If
With ActivePresentation.SlideMaster.HeadersFooters
With .Footer
.Text = "test"
.Visible = msoTrue
End With
End With
With ActivePresentation.Slides.Range.HeadersFooters
With .Footer
.Text = "test"
.Visible = msoTrue
End With
End With

=============================

Have tried this code also with no success:

' Iterate through all designs in the presentation.
For i = 1 To objPres.Designs.Count

' Set the reference to the footer
Set objFooter = objPres.Designs(i).SlideMaster.HeadersFooters.Footer
objFooter.Visible = True
' Set the text to display
objFooter.Text = strFooterText

If blnShowOnTitle Then

' Set the reference to the footer
Set objFooter =
objPres.Designs(i).TitleMaster.HeadersFooters.Footer
objFooter.Visible = True
' Set the text to display
objFooter.Text = strFooterText

End If

Set objFooter = objPres.Slides.Range.HeadersFooters.Footer

objFooter.Text = strFooterText
objFooter.Visible = True

Next i
 
Ad

Advertisements

U

Ulrik

I solved it by clearing the individual slides footers first.

For Each sld In ActivePresentation.Slides
sld.HeadersFooters.Clear
Next

Then the rest of the code worked as expected.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top