|PowerPoint tips, hints and tutorials that will change your presentations for ever!|
If you haven't already read How to Use vba Code you should do this first.
Last Slide Viewed + 1
This code snippet is for use in Slide show mode ONLY. Copy and paste it to a module see How to use vba Code and then give an action button an action of Run > Macro > lastplus
The action button you make will return you to the slide AFTER the last slide viewed. Note that the on error statement is used because in the case of an error (no slide +1) it ignores it. You can change the code to go to the slide BEFORE the last slide viewed.
.GotoSlide (.LastSlideViewed.SlideIndex - 1)
Change My Colour
This code will change the colour of any shape clicked in slide show mode. This is a good place to start adapting code. Adjust the R, G and B values (currently 255,0,0) to get the colour you want.
Any shape that you want to click should be given an action setting of Run > Macro>changecol
Change Font for Whole Presentation
This vba will save your life when someone produces a presentation with different font styles and colours on every page and because they don't follow the Master you have to change each one individually. This vba will do the job in a tick!. You will need to change the values for font name, size and RGB values for title and body text and maybe set .bold and / or .italic to msotrue. Note only text in Placeholders is converted. Thanks to Petlahev for pointing out that the original code needed to check (Czech!) for HasTextFrame!
This code searches placeholders and textboxes in the presentation for BOLD text and un-bolds it
Picture Format in 2007
2007 Offers great picture tools. If you have soft shadows, borders etc set up on one picture this code will set all pictures to the same format. ONLY FOR 2007!
Select the pic that is formatted and run!
Full slide Images
Jump to a Random Slide
This is the code to jump to a random slide within a given range. Give an action button an action of Run > Macro > randjump to use it.
To generate the random number use this formula:
Number =Int((highest number in range - one less that lowest number)*rnd + lowest number in range)
eg For a number between 4 and 10
number = Int(10-3)*rnd+4) ---OR -- Int(7*rnd +4)
So here's the code to jump to a random slide between 4 and 10
Most people will tell you random slide choice can only be done with vba. If vba isn't suitable for your use look at random powerpoint slides without vba
Shuffle Part of Presentation
You can use rnd in a similar way to shuffle a section of a presentation. Input the highest and lowest slide numbers to be affected.
We now have a FREE Add In which can shuffle all or part on your presentation for you! Works only IN 2002-2010
Free Microsoft PowerPoint Advice, help and tutorials, Template Links