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
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