G
Guest
I am trying to provide users a way to advance through only selected slides.
I have tagged the slides I want and created an array to hold the slide index
of those tagged slides. I'd like users to be able to click a button on an
add-in toolbar (which I have already created) and go to the next slide
specified in the array, kind of like the Find Next button.
I can create a procedure that advances through only my tagged slides, but I
don't know how to allow the user to stop and do some editing on each slide
before continuing. So it seems that I need a way for the user to go to the
first tagged slide, and then click to go to the next tagged slide when ready.
I'm stumped as to how to go about this.
Any suggestions?
Here's what I have so far...
Sub advanceSelectedSlides()
' Advance through ILO-Only slides only
Dim oPres As Presentation
Dim oSlides As Slides
Dim oSl As Slide
Dim numSlides As Integer
Dim i As Integer
Dim found As Integer
Dim counter As Integer
Dim arrSlides() As Variant
numSlides = oSlides.Count
found = 0
counter = 0
Set oPres = ActivePresentation
Set oSlides = oPres.Slides
ReDim arrSlides(1 To numSlides)
If IsViewTypeNormal <> True Then
ActiveWindow.ViewType = ppViewNormal
End If
ActiveWindow.View.GotoSlide (1)
For Each oSl In oSlides
With oSl.Tags
For i = 1 To .Count
If .Name(i) = "CONTEXT" And .Value(i) = "ILO Only" Then
found = found + 1
End If
If found <> 0 Then
counter = counter + 1
ReDim Preserve arrSlides(1 To counter)
arrSlides(counter) = .Parent.SlideIndex
Debug.Print .Parent.SlideIndex
found = 0
End If
Next 'i
End With
Next 'oSl
End Sub
I have tagged the slides I want and created an array to hold the slide index
of those tagged slides. I'd like users to be able to click a button on an
add-in toolbar (which I have already created) and go to the next slide
specified in the array, kind of like the Find Next button.
I can create a procedure that advances through only my tagged slides, but I
don't know how to allow the user to stop and do some editing on each slide
before continuing. So it seems that I need a way for the user to go to the
first tagged slide, and then click to go to the next tagged slide when ready.
I'm stumped as to how to go about this.
Any suggestions?
Here's what I have so far...
Sub advanceSelectedSlides()
' Advance through ILO-Only slides only
Dim oPres As Presentation
Dim oSlides As Slides
Dim oSl As Slide
Dim numSlides As Integer
Dim i As Integer
Dim found As Integer
Dim counter As Integer
Dim arrSlides() As Variant
numSlides = oSlides.Count
found = 0
counter = 0
Set oPres = ActivePresentation
Set oSlides = oPres.Slides
ReDim arrSlides(1 To numSlides)
If IsViewTypeNormal <> True Then
ActiveWindow.ViewType = ppViewNormal
End If
ActiveWindow.View.GotoSlide (1)
For Each oSl In oSlides
With oSl.Tags
For i = 1 To .Count
If .Name(i) = "CONTEXT" And .Value(i) = "ILO Only" Then
found = found + 1
End If
If found <> 0 Then
counter = counter + 1
ReDim Preserve arrSlides(1 To counter)
arrSlides(counter) = .Parent.SlideIndex
Debug.Print .Parent.SlideIndex
found = 0
End If
Next 'i
End With
Next 'oSl
End Sub