PowerPoint Macro for Powerpoint 2010 - Add path and file name


Joined
Jun 13, 2012
Messages
1
Reaction score
0
Hi,

i d like to create a VBA macro to add path and file name to the first slide of my ppt presentation.
I m using Powerpoint 2010.
Any thoughts what s wrong with the following?? i m a bit lost...

Sub UpdatePath()

' Macro to add the path and file name to each slide's footer.
Dim PathAndName As String
Dim FeedBack As Integer


' Gets the path and file name and converts the string to lowercase.
PathAndName = LCase(ActivePresentation.Path & "\" & _
ActivePresentation.Name)

' Updates the slide master.
With ActivePresentation.Slide(X).HeadersFooters
With .Footer
.Visible = True
.Text = PathAndName
End With
End With

End Sub

Many thanks!
Best,
 
Ad

Advertisements


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