You really are a gentleman and a scholar. Thank you very much.
Steve Rindsberg said:
This is a good workaround but if it could be modified to put the footer
in the handout only I would be most appreciative.
Here'tis: I've commented out the stuff that changes slides and slide masters,
added a bit to change the Notes master:
Sub UpdatePath()
' Macro to add the path and file name to each slide's footer.
Dim PathAndName As String
Dim FeedBack As Integer
' Place a message box warning prior to replacing footers.
FeedBack = MsgBox( _
"This Macro replaces any existing text that appears " & _
"within your current footers " & Chr(13) & _
"with the presentation name and its path. " & _
"Do you want to continue?", vbQuestion + vbYesNo, _
"Warning!")
' If no is selected in the dialog box, quit the macro.
If FeedBack = vbNo Then
End
End If
' Gets the path and file name and converts the string to lowercase.
'PathAndName = LCase(ActivePresentation.Path & "\" & _
ActivePresentation.Name)
' Name only:
PathAndName = Lcase(ActivePresentation.Name)
' or just ActivePresentation.Name if you don't want it all lowercase
' ' Checks whether there is a Title Master, and if so, updates the
' ' path.
' If ActivePresentation.HasTitleMaster Then
' With ActivePresentation.TitleMaster.HeadersFooters
' With .Footer
' .Text = PathAndName
' End With
' End With
' End If
'
' ' Updates the slide master.
' With ActivePresentation.SlideMaster.HeadersFooters
' With .Footer
' .Text = PathAndName
' End With
' End With
' Let's poke the NotesMaster instead
With ActivePresentation.NotesMaster.HeadersFooters
With .Footer
.Text = PathAndName
End With
End With
' ' Updates the individual slides that do not follow the master.
'Dim X As Integer
'For X = 1 To ActivePresentation.Slides.Count
' With ActivePresentation.Slides(X).HeadersFooters
' With .Footer
' .Text = PathAndName
' End With
' End With
' Next
End Sub
This leaves me with the following questions;
Q. How can I modify the code so the MACRO adds the filename to the
HANDOUT footer text box?
See above but instead of NotesMaster, use HandoutMaster
Q. Is there a library of the macro functions available on the net?
Not as such, but there's a fair amount of sample code in the programming
section of the PPT FAQ (
http://www.pptfaq.com) and there are also links to
other similar sites there.
Q. Also, how can I change the font size of the footer?
Easiest thing is to change it by formatting the placeholder on the appropriate
master.
Q. I saved the macro in the templet *.pot file but it appear to only be
accessible in the pot file. I have tried saving it to the 'all open
documents' option but that doesn't seem to help.
What are you trying to accomplish here?