VBA AutoNaming

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to insert a footer that uses the date a presentation is saved (eg.
111605) as a reference. I use a "baseline" presentation and edit it to make
new presentations. Each time a new one is saved I want this "date name"
written in the presentation footer. I tried unsuccessfully to modify the
path name script at http://www.rdpslides.com/pptfaq/FAQ00407.htm. Any ideas?
 
I want to insert a footer that uses the date a presentation is saved (eg.
111605) as a reference. I use a "baseline" presentation and edit it to make
new presentations. Each time a new one is saved I want this "date name"
written in the presentation footer. I tried unsuccessfully to modify the
path name script at http://www.rdpslides.com/pptfaq/FAQ00407.htm. Any ideas?

Do you want to run a macro yourself to make this happen or do you need it to
happen automatically each time you save. The former should be fairly simple.
The latter would require an add-in.
 
I would prefer to have it automatic on every save, but running a macro would
be an adequate band aid.
 
I would prefer to have it automatic on every save, but running a macro would
be an adequate band aid.

OK ... try this instead of the code in the FAQ

Function DateInSixCharacters() As String
' Returns today's date as e.g. 111605 for Nov 16 2005

DateInSixCharacters = Format(Month(Now), "00") _
& Format(Day(Now), "00") _
& Right$(Year(Now), 2)

End Function
Sub FilenameInFooter()

Dim FooterText As String

' CHANGE THIS:
FooterText = DateInSixCharacters
' instead of setting it to the filename, we're changing it to the
' date

' or if you prefer just the name use
' FooterText = ActivePresentation.Name

If ActivePresentation.HasTitleMaster Then
With ActivePresentation.TitleMaster.HeadersFooters
With .Footer
..Text = FooterText
..Visible = msoTrue
End With
End With
End If

With ActivePresentation.SlideMaster.HeadersFooters
With .Footer
..Text = FooterText
..Visible = msoTrue
End With
End With

With ActivePresentation.Slides.Range.HeadersFooters
With .Footer
..Text = FooterText
..Visible = msoTrue
End With
End With

End Sub
 
Worked great. Thanks for the help.
And if memory serves me....Go Buckeyes..Beat Blue!
 
Worked great. Thanks for the help.
And if memory serves me....Go Buckeyes..Beat Blue!

<g> They're ... no wait ... let me guess!

Sushi eating teams??

SportsChallenged
 

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

Back
Top