rrgw
asked on
library to include for MsoScaleFrom constants
Hi all, I am programming an
application that poduces Power Point slides.
Which references do I have to include in order
to have access to MsoScaleFrom constants and
other constants from power point (msoFalse, msoTrue, etc.)?
Thank you very much,
rr.
application that poduces Power Point slides.
Which references do I have to include in order
to have access to MsoScaleFrom constants and
other constants from power point (msoFalse, msoTrue, etc.)?
Thank you very much,
rr.
Another possibility: add a reference to the powerpoint object library in your project...
Dim appPPT As PowerPoint.Application
Set appPPT = PowerPoint.Application
Dim myPres As Presentation
Set myPres = Presentations.Open(FileNam e:="c:\My documents\pres1.ppt")
myPres.Windows(1).ViewType = ppViewSlideSorter
With ActivePresentation.SlideSh owSettings
.StartingSlide = 2
.EndingSlide = 4
.RangeType = ppShowSlideRange
.AdvanceMode = ppSlideShowUseSlideTimings
.LoopUntilStopped = True
.Run
End With
Dim appPPT As PowerPoint.Application
Set appPPT = PowerPoint.Application
Dim myPres As Presentation
Set myPres = Presentations.Open(FileNam
myPres.Windows(1).ViewType
With ActivePresentation.SlideSh
.StartingSlide = 2
.EndingSlide = 4
.RangeType = ppShowSlideRange
.AdvanceMode = ppSlideShowUseSlideTimings
.LoopUntilStopped = True
.Run
End With
--> Display PowerPoint slide show within a VB form or control window
http://www.mvps.org/skp/vb/pptvbwnd.htm
http://www.mvps.org/skp/vb/pptvbwnd.htm
ASKER
Hi Dhaest,
I programmed the second option, that is:
Dim appPPT As PowerPoint.Application
Set appPPT = PowerPoint.Application
etc.
The problem is: when I compile things like:
With logo
.IncrementTop 393.75
.ScaleWidth 0.48, msoFalse, msoScaleFromTopLeft
.ScaleHeight 0.48, msoFalse, _
msoScaleFromBottomRight
end with
VB complains that constants msoFalse,
msoScaleFromTopLeft and msoScaleFromBottomRight
are undefined.
I am not worried about playing the presentation, because
it will be played afterwards. The program is just to
building the presentation, not playing it.
I found MSPPT.OLB in my disk. Do I have to include it
as a reference or something like that?
I already included the Microsoft PowerPoint 10.0 object library (it was there when VB complained). Is this MSPPT.OLB another one?
Thanks,
rr.
I programmed the second option, that is:
Dim appPPT As PowerPoint.Application
Set appPPT = PowerPoint.Application
etc.
The problem is: when I compile things like:
With logo
.IncrementTop 393.75
.ScaleWidth 0.48, msoFalse, msoScaleFromTopLeft
.ScaleHeight 0.48, msoFalse, _
msoScaleFromBottomRight
end with
VB complains that constants msoFalse,
msoScaleFromTopLeft and msoScaleFromBottomRight
are undefined.
I am not worried about playing the presentation, because
it will be played afterwards. The program is just to
building the presentation, not playing it.
I found MSPPT.OLB in my disk. Do I have to include it
as a reference or something like that?
I already included the Microsoft PowerPoint 10.0 object library (it was there when VB complained). Is this MSPPT.OLB another one?
Thanks,
rr.
instead of msoFalse use False or 0
instead of msoTrue use False or 1
OHDev2004
instead of msoTrue use False or 1
OHDev2004
ASKER
Thanks OHDev2004, but what about the values of the MSOScaleFrom constants?
(msoScaleFromBottomRight, msoScaleFromMiddle, msoScaleFromTopLeft)
rr.
(msoScaleFromBottomRight, msoScaleFromMiddle, msoScaleFromTopLeft)
rr.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you, OHDev2004
Ur welcome :)
OHDev2004
OHDev2004
o call a powerpoint presentation from vb:
Remark, the 5 seconds between each slide has to be defined in the powerpoint presentation self.
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Button Code -
Private Sub btnKernel_Click()
Dim sFile As String
sFile = "C:\3-box.ppt"
Call ShellExecute(hwnd, "Open", (sFile), "", App.Path, 0)
End Sub