
Option Explicit
Public Sub follow_arrow()
Dim sl As Integer, h As Shape, current_slide As Integer
Dim i As Integer, slide_from As Integer, slide_to As Integer
Dim a_slide As slide, a_shape As Shape, caller As Integer
current_slide = ActivePresentation.SlideShowWindow.View.CurrentShowPosition
caller = ActivePresentation.Slides(current_slide).Tags("caller")
If caller <> 0 Then
ActivePresentation.Slides(current_slide).Tags.Add "caller", 0
ActivePresentation.SlideShowWindow.View.GotoSlide caller
Exit Sub
End If
If current_slide = ActivePresentation.Slides.Count Then
slide_from = 1
slide_to = ActivePresentation.Slides.Count - 1
Else
slide_from = current_slide + 1
slide_to = ActivePresentation.Slides.Count
End If
For i = slide_from To slide_to
Set a_slide = ActivePresentation.Slides(i)
For Each a_shape In a_slide.Shapes
If a_shape.AutoShapeType = msoShapeRightArrow Then
ActivePresentation.SlideShowWindow.View.GotoSlide i
a_slide.Tags.Add "caller", current_slide
Exit Sub
End If
Next
Next
End Sub |
Option Explicit
Const AZZURRO = 12419407
Const ARANCIONE = 683236
Public Sub cerca_freccia_azzurra()
Dim i As Integer
Dim a_slide As Slide, a_shape As Shape
For i = 1 To ActivePresentation.Slides.Count
Set a_slide = ActivePresentation.Slides(i)
For Each a_shape In a_slide.Shapes
If a_shape.AutoShapeType = msoShapeRightArrow And a_shape.Fill.ForeColor = AZZURRO Then
ActivePresentation.SlideShowWindow.View.GotoSlide i
Exit Sub
End If
Next
Next
End Sub
Public Sub cerca_freccia_arancione()
Dim i As Integer
Dim a_slide As Slide, a_shape As Shape
For i = 1 To ActivePresentation.Slides.Count
Set a_slide = ActivePresentation.Slides(i)
For Each a_shape In a_slide.Shapes
If a_shape.AutoShapeType = msoShapeRightArrow And a_shape.Fill.ForeColor = ARANCIONE Then
ActivePresentation.SlideShowWindow.View.GotoSlide i
Exit Sub
End If
Next
Next
End Sub
|
