Running a PowerPoint Show (.pps) within VB.NET

  • Thread starter Thread starter Tor Inge Rislaa
  • Start date Start date
T

Tor Inge Rislaa

Running a PowerPoint Show (.pps) within VB.NET

Hi, I have a .NET application that I want to control the presentation of a
PowerPoint Show (.pps). The application should control when the show should
start and when to stop. Is this possible?

TIRislaa
 
I havent go time to fully debug this, but this should set you in the right
direction. First add a COM reference to the Power Point Library 2.8

Private MyPowerPointShow As New PowerPoint.Application

Private SlideIndex As Integer


Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
MyPowerPointShow.Activate()
MyPowerPointShow.Presentations.Open("c:\MyPPT.pps",
Microsoft.Office.Core.MsoTriState.msoTriStateMixed)

Me.Timer1.Enabled = True
End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Timer1.Tick

MyPowerPointShow.ActiveWindow.Presentation.Slides.Item(SlideIndex).Select()
SlideIndex += 1

End Sub

--
OHM ( Terry Burns ) * Use the following to email me *

Dim ch() As Char = "ufssz/cvsotAhsfbuTpmvujpotXjui/OFU".ToCharArray()
For i As Int32 = 0 To ch.Length - 1
ch(i) = Convert.ToChar(Convert.ToInt16(ch(i)) - 1)
Next
Process.Start("mailto:" & New String(ch))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top