Need help with PowerPoint

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • milkyman
    New Member
    • Aug 2006
    • 12

    Need help with PowerPoint

    Hi there,

    I hope you can help me. I did download some code, from the Microsoft knolidgebase(MS DN), 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.Appl ication
    Set ppApp = CreateObject("P owerpoint.Appli cation")

    ' Maak de toepassing zichtbaar.
    ppApp.Visible = True

    ' Voeg een nieuwe presentatie toe.
    Dim ppPres As PowerPoint.Pres entation
    Set ppPres = ppApp.Presentat ions.Add(msoTru e)

    ' Voeg een nieuwe dia toe.
    Dim ppSlide1 As PowerPoint.Slid e
    Set ppSlide1 = ppPres.Slides.A dd(1, ppLayoutText)

    ' Voeg wat tekst toe.
    ppSlide1.Shapes (1).TextFrame.T extRange.Text = txtTekst1.Text '"Mijn eerste dia"
    ppSlide1.Shapes (2).TextFrame.T extRange.Text = txtTekst2.Text '"PowerPoint automatiseren is een makkie" & vbCr & "Werken met Visual Basic is cool!"

    ' Stel eigenschappen van de diavoorstelling in.
    With ppPres.Slides.R ange.SlideShowT ransition
    .EntryEffect = ppEffectRandom
    .AdvanceOnTime = msoTrue
    .AdvanceTime = 5 ' 5 seconds per slide
    End With

    ' Bereid de diavoorstelling voor en voer deze uit.
    With ppPres.SlideSho wSettings
    .ShowType = ppShowTypeKiosk
    .LoopUntilStopp ed = msoTrue

    .RangeType = ppShowAll
    .AdvanceMode = ppSlideShowUseS lideTimings
    .Run
    End With

    ' Slaapstand inschakelen, zodat gebruiker diavoorstelling kan bekijken.
    Sleep (15000)

    ' Opschonen.
    ppApp.Quit
Working...