|
-
Oct 24th, 2001, 04:08 AM
#1
Thread Starter
Member
Running Power Point Show from VB
Running Power Point Show from VB
Hi,
I am creating an application in VB, wherein the left portion of a form is being used to get input from the user while the right portion of the form is going to be used for displaying Power Point Slide show.
I have created some PPS (Power Point Show) files and am calling it from the VB form, by using PowerPoint Object.
The problem is that PPS runs in its own process and I am not able to run it within a specified space or container in my form. i.e when I call the PPS file from VB, it starts with a full screen view. I have written some code to manage the PPS window, but that gets executed only after the PPS has started running.
Secondly, the PPS which is now running is running in its own process. Consequently, the user can close the PPS or the VB application individually, which I don’t want, because both are integrated.
Please help me on this front.
-
Oct 24th, 2001, 04:15 AM
#2
Conquistador
why not make the PP object invisible and disallow closing of the form?
then when you have to show them a presentation, you can make the PP object visible again ?
-
Oct 24th, 2001, 06:26 AM
#3
This should get you started:
VB Code:
*'Note:
*'Add Microsoft Powerpoint 8.0Oject Library Office '97 in References
*'This code snipplet come from Microsoft Office Development site
Add commandbuuton in the from and name it cmdOpenPPT
In cmdOpenPPT_Click add the code below:
OpenPresentation(strFilename)
'* strFilename = Powerpoint Presentation File
Private Declare Sub Sleep Lib "kernel32" Alias "Sleep" (ByVal dwMilliseconds As Long)
Private Sub OpenPresentation(strFilename As String)
Dim oPPT As PowerPoint.Application
Set oPPT = New PowerPoint.Application
'open a powerpoint file
With oPPT
.Visible = True
.Presentations.Open (strFilename)
.Presentations(strFilename).Close
End With
'View the slide show
Sleep 500
With oPPT.ActivePresentation.SlideShowSettings
.AdvanceMode = ppSlideShowUseSlideTimings
.Run
End With
'Wait until there are no more slide show windows and then quit
'Powerpoint
Do
Sleep 1000
Loop While oPPT.SlideShowWindows.Count > 0
oPPT.Quit
Set oPPT = Nothing
End Sub
Private Sub cmdOpenPPT_Click()
OpenPresentation "c:\files\takefive.pps"
End Sub
Bare in mind it does come from Microsoft so you will probably have to do some tweaking.
-
Oct 24th, 2001, 06:30 AM
#4
Thread Starter
Member
Thanks But already tried
Thanks hack...This code I have already tried but the same problem...The PPS is running seperately from VB application....It should run within VB application in some container or otherwise...
-
Oct 24th, 2001, 06:53 AM
#5
Hmmm...I know you can embed and Word document and an Excel spreadhsheet as an OLE object in VB, but I'm not sure about PowerPoint. Let me do a little reasearch and I'll get back to you.
-
Oct 24th, 2001, 07:26 AM
#6
Check out this MSDN link and see if it has anything useful for you.
http://msdn.microsoft.com/library/de...ml/ppkbppt.asp
-
Sep 13th, 2006, 01:56 PM
#7
Lively Member
Re: Running Power Point Show from VB
This link is no longer valid..is there another example somewhere on how to embedd a Powerpoint presentation into VB?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|