Reputation: 21
I have a macro that changes font and font size but I do not need it to start on the first slide how do I program it to start on the second slide first? Also how do I change the slide size with macros?
Upvotes: 2
Views: 854
Reputation: 14809
Depending on what you intend to so, the other answers may be correct. If you want to start on slide 2 and continue until the end of the show, then something like this:
Dim x as Long
Dim oSl as Slide
For x = 2 to ActivePresentation.Slides.Count
Set oSl = ActivePresentation.Slides(x)
With oSl
' Do whatever you need to do with the slide here
End With
Next
Upvotes: 0
Reputation: 783
If ActivePresentation.SlideShowWindow.View.Slide.SlideIndex = 2 Then
'change font and size
End If
This is an If-Condition to change the font and size only when you are in Slide Number 2.
Upvotes: 0
Reputation: 4913
Using PowerPoint Events, you can capture the SlideShowNextSlide event, then check the SlideIndex property to find if it's number 2. If it is, call the Sub you want to run. Here's a tutorial on how to use events, the links in it are also worth reading: Make your VBA code in PowerPoint respond to events
This statement will change the slide size:
ActivePresentation.PageSetup.SlideSize = ppSlideSizeLetterPaper
Upvotes: 1