P
Phoenix1_uk
Have code from varies sites inc microsoft hwoever tried to add a third text
box and then it fails - would be useful as have certain automaticly
genereated results every week and not fancy copy/paste and/writing if I not
need to. Also want to auto genereate the images as well. Any ideas?
box and then it fails - would be useful as have certain automaticly
genereated results every week and not fancy copy/paste and/writing if I not
need to. Also want to auto genereate the images as well. Any ideas?
Code:
Private Sub Command2_Click()
' Start PowerPoint.
Dim ppApp As PowerPoint.Application
Set ppApp = CreateObject("Powerpoint.Application")
' Make it visible.
ppApp.Visible = True
' Add a new presentation.
Dim ppPres As PowerPoint.Presentation
Set ppPres = ppApp.Presentations.Add(msoTrue)
' Add a new slide.
Dim ppSlide1 As PowerPoint.Slide
Set ppSlide1 = ppPres.Slides.Add(1, ppLayoutText)
' Add some text.
ppSlide1.Shapes(1).TextFrame.TextRange.Text = "My first slide"
ppSlide1.Shapes(2).TextFrame.TextRange.Text = "Automating Powerpoint is
easy" & vbCr & "Using Visual Basic is fun!"
' Setup slide show properties.
With ppPres.Slides.Range.SlideShowTransition
.EntryEffect = ppEffectRandom
.AdvanceOnTime = msoTrue
.AdvanceTime = 5 ' 5 seconds per slide
End With
' Prepare and run the slide show.
With ppPres.SlideShowSettings
.ShowType = ppShowTypeKiosk
.LoopUntilStopped = msoTrue
.RangeType = ppShowAll
.AdvanceMode = ppSlideShowUseSlideTimings
.Run
End With
' Sleep so user can watch the show.
Sleep (15000)
' Clean up.
ppApp.Quit
End Sub