PowerPoint Slide Branching (VBA)

I am trying to create a back button, but using hyperlinks, it just brings me to the previous page and ends in a loop ... for example. if I have slide 1 that has links for slides 3, 4 and 5, then slide 3 links to 6 and 7. If I'm on slide 7 now and go back, it brings me back to slide 3, but then I want to click and end up on slide 1, not back to slide 7 (hopefully I'm making some sense!).

I suppose the only way for me to do this is with VBA, can someone give me some tips on how to create a back button? (I am using PowerPoint 2007)

+6
powerpoint-vba powerpoint
source share
3 answers

It looks like you want to get a “track with a palette” of visited slides instead of a simple back button. So you need a way to keep track.

This can be solved using a dynamic array. A new view will add entries to the array. Your Next and Previous locations will be found by moving up or down the array. You will have puzzles with easy logic. I hate referencing a shared resource , but I'm not up to date, and a review may be helpful.

UPDATE: I wanted this in the past for MS Access, and thought that I would readily find a solution for fragments. But now I go looking (thinking that it will also be easily transformed for you), and I will not find anything. This is surprising because I think it would be interesting to build. Or ... it's harder to build than I expect.

+2
source share

There is a very cumbersome way to do this in PPT directly without programming. You will need front slides and two sets of backward slides. The rear ones are two types: straight and rear. They may be the same, but hide hidden ones (for example, instead of “Slide 3” you will need “Slide 3a” and “Slide 3b” and “Slide 3c.”). They are hidden, so that when you progress normally, you will not see them, but when you turn to them, they will appear. Your list of links on slides "a" should always point to slides "b", and slides "b" point to slides "c". Your hyperlinks on the “back button” on slides “a” should be “previous slide”, and slides “c” should be “last slide show” and slides “h” should be “first slide” (use the “action” to set it is instead of a "hyperlink").

It takes some time to work, but it can be done.

+2
source share

Today I faced a similar problem and made a little breadcrumbs - a generator for powerpoint. There is no link yet, but you can implement it if you want: Github Project

The main parts of the code

Public Sub breadcrumbs(ByVal count As Integer, ByRef titles() As String) Dim cntr As Integer Dim content() As String Dim margin As Integer Dim width As Integer '---------------------------- ' Set Titles content = titles cntr = 0 ' Set width width = ((Application.ActivePresentation.PageSetup.SlideWidth - (margin * count * 2) - 20) / count) - 50 ' Loop through all slides For Each sld In Application.ActivePresentation.Slides ' generate breadcrumb for each title For Each con In content sld.Shapes.AddShape(1, (50 + (width * cntr)), 15, width, 50).TextFrame.TextRange.Text = con cntr = cntr + 1 Next con cntr = 0 Next sld End Sub 
+2
source share

All Articles