Opening a Powerpoint

G

Guest

I am trying to open an existing powerpoint presentation from access using
vba. When I open the file, it opens a new file with nothing in the file with
the same name. This is the code I am using.....

Set oPowerPoint = New PowerPoint.Application
Set oPres = oPowerPoint.Presentations.Open(<Path>, , , False)
 
G

Guest

use the FollowHyperlink , check help on the subject

application.FollowHyperlink PPTLocationAndName
 
G

Guest

That didn't work. When it execute that line, PowerPoint pops up stating I
need to have it in the edit mode and do I want to save it. It still opens a
new presentation with nothing there. Maybe I need to copy my presentation
into the one that opens. I will try that and let you know how it works.
 
D

David Lloyd

The following code seems to work:

Function OpenPresentation()

Dim oPowerPoint As PowerPoint.Application
Dim oPres As PowerPoint.Presentation

On Error GoTo Errorhandler

Set oPowerPoint = New PowerPoint.Application
oPowerPoint.Visible = msoTrue
Set oPres = oPowerPoint.Presentations.Open("h:\testapp.ppt", , ,
msoTrue)
AppActivate "testapp.ppt", True

Function_Exit:

Set oPowerPoint = Nothing
Set oPres = Nothing

Exit Function

Errorhandler:
'Error handling here
Resume Function_Exit

End Function

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.


I am trying to open an existing powerpoint presentation from access using
vba. When I open the file, it opens a new file with nothing in the file
with
the same name. This is the code I am using.....

Set oPowerPoint = New PowerPoint.Application
Set oPres = oPowerPoint.Presentations.Open(<Path>, , , False)
 
G

Guest

I do not want the presentation to display. What I am trying to do is
retrieve the data from the datasheets. This is being executed in the
background. I do not want the presentation to be seen.
 

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