rpm
asked on
Embed Powerpoint into a VB6 Form
I need to embed a Powerpoint into a VB6 Form.
The presentation is auto-advancing so once it has been started, it will need to proceed automatically, as it would in Powerpoint itself.
I also needs to automatically scale into a control on a form, rather than open in a new window.
Does anyone have a code sample to do this?
The presentation is auto-advancing so once it has been started, it will need to proceed automatically, as it would in Powerpoint itself.
I also needs to automatically scale into a control on a form, rather than open in a new window.
Does anyone have a code sample to do this?
Hi,
Very nice, easy and free control from Microsoft is DsoFramer. Try it...
http://support.microsoft.com/default.aspx?scid=kb;en-us;311765
Very nice, easy and free control from Microsoft is DsoFramer. Try it...
http://support.microsoft.com/default.aspx?scid=kb;en-us;311765
ASKER
This method looks promising, but I cannot work out how to start the slideshow
Hi,
I am writing to from my mobile (I am on the way), so i don't have my computer to give you an example code, but all VBA code are working here...
if you will not find any, i'll help on Monday...
I am writing to from my mobile (I am on the way), so i don't have my computer to give you an example code, but all VBA code are working here...
if you will not find any, i'll help on Monday...
Hi,
Sub SlideShow_Click()
With oDoc.ActivePresentation.Sl ideShowSet tings
.ShowType = ppShowTypeSpeaker
.LoopUntilStopped = msoFalse
.ShowEithNarration = msoTrue
.ShowWithAnimation = msoTrue
.RangeType = ppShowAll
.AdvanceMode = ppSlideShowUseSlideTimings
.PointerColor.SchemeColor = ppForeground
.Run
End With
End Sub
Have fun...!
Sub SlideShow_Click()
With oDoc.ActivePresentation.Sl
.ShowType = ppShowTypeSpeaker
.LoopUntilStopped = msoFalse
.ShowEithNarration = msoTrue
.ShowWithAnimation = msoTrue
.RangeType = ppShowAll
.AdvanceMode = ppSlideShowUseSlideTimings
.PointerColor.SchemeColor = ppForeground
.Run
End With
End Sub
Have fun...!
ASKER
Ok, I created a blank project, put a FramerControl object on the blank form, called it oDoc
I then created a button with the following event:
Private Sub Command1_Click()
oDoc.Open App.Path & "\welcome.ppt"
With oDoc.ActivePresentation.Sl ideShowSet tings
.ShowType = ppShowTypeSpeaker
.LoopUntilStopped = msoFalse
.ShowEithNarration = msoTrue
.ShowWithAnimation = msoTrue
.RangeType = ppShowAll
.AdvanceMode = ppSlideShowUseSlideTimings
.PointerColor.SchemeColor = ppForeground
.Run
End With
End Sub
When I click the button the PPT loads, and then I get the following error:
"Objject doesn't support this property or method"
This error occurs on the WITH line!
I then created a button with the following event:
Private Sub Command1_Click()
oDoc.Open App.Path & "\welcome.ppt"
With oDoc.ActivePresentation.Sl
.ShowType = ppShowTypeSpeaker
.LoopUntilStopped = msoFalse
.ShowEithNarration = msoTrue
.ShowWithAnimation = msoTrue
.RangeType = ppShowAll
.AdvanceMode = ppSlideShowUseSlideTimings
.PointerColor.SchemeColor = ppForeground
.Run
End With
End Sub
When I click the button the PPT loads, and then I get the following error:
"Objject doesn't support this property or method"
This error occurs on the WITH line!
>This error occurs on the WITH line!
Which with line? On the code? Strage...
Which with line? On the code? Strage...
ASKER
With oDoc.ActivePresentation.Sl ideShowSet tings
O.K.
First, you have to set reference to: Microsfot PowerPoint 10.0 Object Libery.
Second, here is the full code that works for me:
Private Sub Command1_Click()
Dim oDoc As PowerPoint.Presentation
FramerControll.Open (App.Path & "\welcome.ppt")
Set oDoc = FramerControll.ActiveDocum ent
With oDoc.SlideShowSettings
.ShowType = ppShowTypeSpeaker
.LoopUntilStopped = msoFalse
.ShowEithNarration = msoTrue
.ShowWithAnimation = msoTrue
.RangeType = ppShowAll
.AdvanceMode = ppSlideShowUseSlideTimings
.PointerColor.SchemeColor = ppForeground
.Run
End With
End Sub
* Please note that oDoc is you ActiveDocument and the DsoFramer called FramerControll.
Good luck...
First, you have to set reference to: Microsfot PowerPoint 10.0 Object Libery.
Second, here is the full code that works for me:
Private Sub Command1_Click()
Dim oDoc As PowerPoint.Presentation
FramerControll.Open (App.Path & "\welcome.ppt")
Set oDoc = FramerControll.ActiveDocum
With oDoc.SlideShowSettings
.ShowType = ppShowTypeSpeaker
.LoopUntilStopped = msoFalse
.ShowEithNarration = msoTrue
.ShowWithAnimation = msoTrue
.RangeType = ppShowAll
.AdvanceMode = ppSlideShowUseSlideTimings
.PointerColor.SchemeColor = ppForeground
.Run
End With
End Sub
* Please note that oDoc is you ActiveDocument and the DsoFramer called FramerControll.
Good luck...
ASKER
Thank you for your continued support with this issue, unfortunatly we are still not quite there!
The above solution does indeed open the PPT and display it, but unfortunatly it appears in fulscreen mode, not in the object on the form.
I tried .ShowType = ppShowTypeWindow, but that displayed the PPT in a new Window.
Is there a way to make the PPT display within the FramerControl?
The above solution does indeed open the PPT and display it, but unfortunatly it appears in fulscreen mode, not in the object on the form.
I tried .ShowType = ppShowTypeWindow, but that displayed the PPT in a new Window.
Is there a way to make the PPT display within the FramerControl?
Hi,
Change the line > .ShowType = ppShowTypeSpeaker
to: .ShowType = ppShowTypeWindow
Change the line > .ShowType = ppShowTypeSpeaker
to: .ShowType = ppShowTypeWindow
Oooppsss, Just now I see that already tryed that....
I'll think of something else...
I'll think of something else...
What is exactly you what to achieve?
What is the purpose of your project?
Maybe will try some thind else, maybe "Automation" of PowerPoint?
What is the purpose of your project?
Maybe will try some thind else, maybe "Automation" of PowerPoint?
ASKER
It is a message board package for public locations, which displays various messages and various times.
There is a main message panel on screen, along with vrious other panels.
The main panel mainly contains HTML pages, but I have been asked to allow PPTs to be shown in that panel too!
Richard
There is a main message panel on screen, along with vrious other panels.
The main panel mainly contains HTML pages, but I have been asked to allow PPTs to be shown in that panel too!
Richard
The PPT must show the SlideShow or it can show on slide at a time?
ASKER
The system must run completely unattended, so it needs to automatically progress through the slideshow
I've try so many thing, sometimes it's worked & sometimes not... this component has some bugs.
If you know C you can fix it or ajust it as you like (the source code came whith the download zip)
Other idea is to use the ppt component.....
http://www.codeproject.com/useritems/mclhotkey.asp
http://support.microsoft.com/kb/222929/en-us
http://www.google.com/search?hl=iw&as_qdr=all&q=vb+powerpoint+automation+site%3Amicrosoft.com&btnG=%D7%97%D7%99%D7%A4%D7%95%D7%A9&lr=
Good luck!
If you know C you can fix it or ajust it as you like (the source code came whith the download zip)
Other idea is to use the ppt component.....
http://www.codeproject.com/useritems/mclhotkey.asp
http://support.microsoft.com/kb/222929/en-us
http://www.google.com/search?hl=iw&as_qdr=all&q=vb+powerpoint+automation+site%3Amicrosoft.com&btnG=%D7%97%D7%99%D7%A4%D7%95%D7%A9&lr=
Good luck!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Although the problem has not be solved with 100% satisfaction, I do recognise the immense effort that 2Angel has made to solve this problem and the genuine usefulness of his comments, and hence award the points ...
Thanks!
Good luck to you....
Good luck to you....
Hi 2angel,
I implemented your code using the FramerControl1 from MS. Here's what happens when I link to a ppsx . The ppsx show opens in a new window (form) and the corresponding pptx opens in the framer control. How can I get just the ppsx to open and have it open in the framercontrol?
Thanks.
I'm using VB6.
Private Sub Command1_Click()
Dim oDoc As PowerPoint.Presentation
FramerControll.Open (App.Path & "\welcome.ppt")
Set oDoc = FramerControll.ActiveDocum ent
With oDoc.SlideShowSettings
.ShowType = ppShowTypeSpeaker
.LoopUntilStopped = msoFalse
.ShowEithNarration = msoTrue
.ShowWithAnimation = msoTrue
.RangeType = ppShowAll
.AdvanceMode = ppSlideShowUseSlideTimings
.PointerColor.SchemeColor = ppForeground
.Run
End With
End Sub
I implemented your code using the FramerControl1 from MS. Here's what happens when I link to a ppsx . The ppsx show opens in a new window (form) and the corresponding pptx opens in the framer control. How can I get just the ppsx to open and have it open in the framercontrol?
Thanks.
I'm using VB6.
Private Sub Command1_Click()
Dim oDoc As PowerPoint.Presentation
FramerControll.Open (App.Path & "\welcome.ppt")
Set oDoc = FramerControll.ActiveDocum
With oDoc.SlideShowSettings
.ShowType = ppShowTypeSpeaker
.LoopUntilStopped = msoFalse
.ShowEithNarration = msoTrue
.ShowWithAnimation = msoTrue
.RangeType = ppShowAll
.AdvanceMode = ppSlideShowUseSlideTimings
.PointerColor.SchemeColor = ppForeground
.Run
End With
End Sub
http://eserver.bell.ac.uk/mirrors/vb6/pt10_3.htm
:)