vba code to insert filename in footer

  • Thread starter Thread starter mareenq
  • Start date Start date
M

mareenq

I have no idea how to write VBA code, and I can't find anything published to
create a macro that will update the filename in my PPT 07 footers.

I'd be very grateful for some help
thanks
 
Have a look here to see if this meets your needs.
http://support.microsoft.com/kb/222797

--
Michael Koerner
MS MVP - PowerPoint


I have no idea how to write VBA code, and I can't find anything published to
create a macro that will update the filename in my PPT 07 footers.

I'd be very grateful for some help
thanks
 
Thanks but no cigar I'm afraid! I get a run time error and the debugger
highlights:
.Text = PathAndName
.... which explains not very much :-(
 
Unfortunately, I believe that code would not work for PPT2007. Slide
masters have changed.
--David
 
Arrrrrrrrrrrrgh your quite correct David, missed the 2007. ISTR that John
Wilson wrote a macro for just this purpose a while back. Unfortunately I
can't find it on his site.

--
Michael Koerner
MS MVP - PowerPoint


Unfortunately, I believe that code would not work for PPT2007. Slide
masters have changed.
--David
 
The code fails because most likely there is no footer visible on the slides
when you itterate through them

Make this change to the last bit ...

With ActivePresentation.Slides(X).HeadersFooters
With .Footer
..Visible=True 'Add this line
..Text = PathAndName
End With
End With

--

john ATSIGN PPTAlchemy.co.uk
Custom vba coding and PPT Makeovers
Free PPT Hints, Tips and Tutorials
http://www.pptalchemy.co.uk/powerpoint_hints_and_tips_tutorials.html
 
Thanks John

--
Michael Koerner
MS MVP - PowerPoint


"John Wilson" <john AT technologytrish.co DOT uk> wrote in message
The code fails because most likely there is no footer visible on the slides
when you itterate through them

Make this change to the last bit ...

With ActivePresentation.Slides(X).HeadersFooters
With .Footer
..Visible=True 'Add this line
..Text = PathAndName
End With
End With

--

john ATSIGN PPTAlchemy.co.uk
Custom vba coding and PPT Makeovers
Free PPT Hints, Tips and Tutorials
http://www.pptalchemy.co.uk/powerpoint_hints_and_tips_tutorials.html
 
Even by using the below code it still getting debug message at .Text = PathAndName

Could someone help me out to get the code for displaying the filename and path at the footer by deafult in powerpoint.

Please.....
 
Here it is for Word, in case anyone is searching for it!

Sub InsertFilenameFooter()
With ActiveDocument.Sections(1)
.Footers(wdHeaderFooterPrimary).Range.Text = ActiveDocument.Path & Application.PathSeparator & ActiveDocument.Name​
End With
End Sub
 
Back
Top