Hi there,
I hope you can help me. I did download some code, from the Microsoft knolidgebase(MSDN), and it's great. I just don't know how to change the code so that it uses a template, thats on my computer, instate of a blank page.
Also i want to controle the presentation with a mouse click(or both). Now it's changing a slide after 5 sec. if i press the mouse button nothing hapens.
thank you for helping me.... :)
here is the code:
' Start PowerPoint.
Dim ppApp As PowerPoint.Application
Set ppApp = CreateObject("Powerpoint.Application")
' Maak de toepassing zichtbaar.
ppApp.Visible = True
' Voeg een nieuwe presentatie toe.
Dim ppPres As PowerPoint.Presentation
Set ppPres = ppApp.Presentations.Add(msoTrue)
' Voeg een nieuwe dia toe.
Dim ppSlide1 As PowerPoint.Slide
Set ppSlide1 = ppPres.Slides.Add(1, ppLayoutText)
' Voeg wat tekst toe.
ppSlide1.Shapes(1).TextFrame.TextRange.Text = txtTekst1.Text '"Mijn eerste dia"
ppSlide1.Shapes(2).TextFrame.TextRange.Text = txtTekst2.Text '"PowerPoint automatiseren is een makkie" & vbCr & "Werken met Visual Basic is cool!"
' Stel eigenschappen van de diavoorstelling in.
With ppPres.Slides.Range.SlideShowTransition
.EntryEffect = ppEffectRandom
.AdvanceOnTime = msoTrue
.AdvanceTime = 5 ' 5 seconds per slide
End With
' Bereid de diavoorstelling voor en voer deze uit.
With ppPres.SlideShowSettings
.ShowType = ppShowTypeKiosk
.LoopUntilStopped = msoTrue
.RangeType = ppShowAll
.AdvanceMode = ppSlideShowUseSlideTimings
.Run
End With
' Slaapstand inschakelen, zodat gebruiker diavoorstelling kan bekijken.
Sleep (15000)
' Opschonen.
ppApp.Quit