On Wed, 07 Jun 2006 22:21:29 -0400, daD <JA********@COX.NET> wrote:
This is the Automation way of doing things:
From a code window, use Tools > References to set a reference to PPT.
In a form, have two buttons: cmdOpenPPT and cmdClosePPT.
At the module level:
Dim objPPT as PowerPoint.Application
Dim objPresentation As PowerPoint.Presentation
In the click events:
private sub cmdOpenPPT_Click()
Set objPPT = CreateObject("PowerPoint.Application")
objPPT.Visible = True
set objPresentation = objPPT.Presentations.Open("c:\test.ppt")
end sub
private sub cmdClosePPT_Click()
objPresentation.Close
set objPresentation = nothing
set objPPT = nothing
end sub
If you install all options of PowerPoint, you will get a help file
that describes the entire object model.
-Tom.
Thanks Tom. In the button properties, I set the hyperlink address to
launch the specific file I am interested in (in my case, I open a map
in Powerpoint). When I open the map, there is a "back" button
generated that is on the toolbar in Powerpoint. If there is a way to
open a document by building an event in Visual basic, could someone
share it? I'm not too hot with VB. Thanks again!
James
On Tue, 06 Jun 2006 21:27:03 -0700, Tom van Stiphout
<no*************@cox.net> wrote:
On Tue, 06 Jun 2006 22:21:22 -0400, daD <JA********@COX.NET> wrote:
Perhaps you can share some code - I don't understand how you are
launching the PPT file (I use Automation. You?) nor what the Back
button has to do with it - smells like you're using a browser?
-Tom.
I am using an access front-end to open a MS P{werpoint presentation.
My problem is that when I am finished with the presentation and use
the "back" button on the toolbar to return to MS Access, MS Powerpoint
remains open. Everytime I open another presentation, the problem
repeats. Is there any way to tell Powerpoint to close or to close the
prentration when done. Thanks!