Teil 7:
'load from settings
Dim left As Integer: left = CInt(GetSetting(appname:="PogressBar", _
Section:="PosPogressBar", Key:="leftPos"))
Dim top As Integer: top = presentation.PageSetup.SlideHeight - CInt( _
GetSetting(appname:="PogressBar", Section:="PosPogressBar", Key:="topPos"))
Dim sizeOfBullet As Integer: sizeOfBullet = CInt(GetSetting( _
appname:="PogressBar", Section:="PosPogressBar", Key:="sizeOfBullet"))
Dim spaceBetweenBullets As Integer: spaceBetweenBullets = CInt(GetSetting( _
appname:="PogressBar", Section:="PosPogressBar", _
Key:="spaceBetweenBullets"))
Dim maxleft As Integer: maxleft = CInt(GetSetting(appname:="PogressBar", _
Section:="PosPogressBar", Key:="wraparound"))
Dim wraparoundoffset As Integer: wraparoundoffset = CInt(GetSetting( _
appname:="PogressBar", Section:="PosPogressBar", Key:="wraparoundlimit"))
Dim colorRed As Integer: colorRed = CInt(GetSetting(appname:="PogressBar", _
Section:="PosPogressBar", Key:="colorRed"))
Dim colorYellow As Integer: colorYellow = CInt(GetSetting( _
appname:="PogressBar", Section:="PosPogressBar", Key:="colorYellow"))
Dim colorBlue As Integer: colorBlue = CInt(GetSetting( _
appname:="PogressBar", Section:="PosPogressBar", Key:="colorBlue"))
Dim vertical As Boolean: vertical = CBool(GetSetting(appname:="PogressBar", _
Section:="PosPogressBar", Key:="OptionVertical"))
'init if fields are null
If IsNull(left) Then
left = 20
End If
'init if fields are null
If IsNull(maxleft) Then
left = 500
End If
If IsNull(top) Then
top = 50
End If
If IsNull(sizeOfBullet) Then
sizeOfBullet = 6
End If
If IsNull(spaceBetweenBullets) Then
spaceBetweenBullets = 8
End If
'init if fields are null
If IsNull(wraparoundoffset) Then
wraparoundoffset = 2 * sizeOfBullet
End If
initialLeft = left
initialTop = top
With presentation
Dim currentSlideNumber As Integer: currentSlideNumber = 0
For Each slide In .Slides
'bullet counter needed to do wrap arround
bulletCounter = 0
left = initialLeft
top = initialTop
Dim slideNumber As Integer: slideNumber = 0
'Dim notHidden As Boolean: notHidden =
' Slide.SlideShowTransition.Hidden =
' Microsoft.Office.Core.MsoTriState.msoFalse
notHidden = Not slide.SlideShowTransition.Hidden
'Dim notIgnored As Boolean
notIgnored = True
If slide.NotesPage.Tags.Count = 0 Then
notIgnored = True
Else
notIgnored = False
End If
If notHidden And notIgnored Then
For Each sectionLength In mySections
If vertical Then
If top > maxleft Then
left = left + wraparoundoffset
top = initialLeft
End If
Else
If left > maxleft Then
top = top + wraparoundoffset
left = initialLeft
End If
End If |