Automation from Access to Powerpoint

G

Guest

I am using the below procedure to open up an Excel Worksheet Embedded in a
powerpoint presentation. I have got that to work, What I cannot get it to do
is open an embedded Excel Worksheet on any other slide but the first slide.
Any suggestions on how to open the file and open the worksheet on slides two
or three?

Eventually want to be able to take data in the Database and write it to
specific cells in the Excel spreadsheets in the PPT to update multiple cells
with a single click on the command button.


Private Sub UpDateTngMtgSlides_Click()
'Declare a variable to contain the path to the Office File
Dim MyPPTPath As String

'Define the path to the Office File
MyPPTPath = "C:\Documents and Settings\Philippe\Desktop\Training Room
Database\pptxl.pptx"

'Set up object variable to refer to the Office Objects
Dim PPT As New PowerPoint.Application
Dim PPTSlides As PowerPoint.Presentation

'Open an instance of the Office Objects
Set PPT = CreateObject("PowerPoint.Application") 'Opens Microsoft PowerPoint
Set PPTSlides = GetObject(MyPPTPath) 'Opens the file defined in the path

PPT.Visible = True 'Makes the Powerpoint application visible

PPTSlides.Slides(1).Shapes(1).OLEFormat.DoVerb 'Opens the Object on slide 1

End Sub
 
J

John Nurick

Hi Phillippe,

This is really a question about programming PowerPoint, and you're
more likely to get a good quick answer if you ask in a PowerPoint
forum.
 

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

Top