So I got really annoyed while trying to figure out how to format slide numbers for Power Point 2007 and decided to write my own macro for it. I want each slide to display <Page Number> of <Total Pages>. I can only get power point to automatically display the current page, but not the total pages. I dont want to have manually change the total page number for every slide every time I add or delete a slide. So here is my function:
So now my question is: How do I get power point to call the function and return the value into a textbox? I tried
= <#> & "/" & TotalSlides()
But it's not working.
-JTBorton
Well, You can try banging your head against the wall, but you just end up with lost-time injuries and damaged equipment. [M. Passman]
Code:
Option Explicit
Function TotalSlides()
Dim objPresentation As Presentation
Set objPresentation = Application.Presentations(1)
TotalSlides = objPresentation.Slides.Count
End Function
So now my question is: How do I get power point to call the function and return the value into a textbox? I tried
= <#> & "/" & TotalSlides()
But it's not working.
-JTBorton
Well, You can try banging your head against the wall, but you just end up with lost-time injuries and damaged equipment. [M. Passman]