 |
 |

10-22-2003, 12:54 PM
|
|
Newcomer
|
|
Join Date: Oct 2003
Posts: 4
|
|
Open PPT from Excel
|
I have an existing presentation in Power Point that I would like to launch from excel. When I try to code...ppt is an invalid file type.
Is there a way to launch powerpoint from excel??
I would like to open x:\data\listing.xls, then open my power point presentation X:\data\CarShow.ppt by clicking on a button within excel.
Thanks in advance.
|
|

10-22-2003, 01:42 PM
|
|
Regular
|
|
Join Date: Oct 2003
Location: Dublin, Ireland
Posts: 75
|
|
Attach the following code to your button in Excel :
Code:
Sub LaunchPPT()
Dim ppt As Object
Set ppt = CreateObject("PowerPoint.Application")
ppt.Visible = True
ppt.Presentations.Open "X:\data\CarShow.ppt"
Set ppt = Nothing
End Sub
Regards,
|
|

10-22-2003, 01:57 PM
|
|
Newcomer
|
|
Join Date: Oct 2003
Posts: 4
|
|
|
Thank you so much for your help. The code worked perfectly.
I hope I am not pushing my luck, is there anyway once the ppt is open to automatically run the update link option? If not, that’s ok. You have helped me out more than you can imagine.
Thanks again.
|
|

10-22-2003, 02:20 PM
|
|
Regular
|
|
Join Date: Oct 2003
Location: Dublin, Ireland
Posts: 75
|
|
|
Don't worry about pushing your luck, but as I do not do much with Powerpoint perhaps another will suggest an answer.
In the meantime, is it possible for to set up the links in powerpoint so that they auto update when the document is opened.
Cheers
|
|

10-22-2003, 03:03 PM
|
|
Senior Contributor
|
|
Join Date: Jul 2003
Posts: 1,022
|
|
I know almost nothing about powerpoint, but by looking in PowerPoints VBA help, it looks like you could insert a new Class module and place this code there. - I did so and my test presentation opened without any error for me; but you would have to actualy set up a link and test it that way, to see if it actualy will do the job.
Code:
Private Sub App_PresentationOpen(ByVal Pres As Presentation)
With Pres
.UpdateLinks ' or just this one line ActivePresentation.UpdateLinks
End With
End Sub
Hope it works
Edit: I found this by typing "event" in the help search in the VB editor.
I saw one that said something like open event. I read there that it needs to be in a class module. So I inserted a new Class Module and copied and pasted the relivant part of the code there. - Then I typed in "Link" and there was a list of matches, one having to do with Updating Links: ActivePresentation.UpdateLinks
|
Last edited by tboltfrank; 10-22-2003 at 03:17 PM.
|

10-22-2003, 03:14 PM
|
|
Regular
|
|
Join Date: Oct 2003
Location: Dublin, Ireland
Posts: 75
|
|
In view of tboltfrank's contribution perhaps the following might help :
Code:
Sub LaunchPPT()
Dim ppt As Object
Set ppt = CreateObject("PowerPoint.Application")
With ppt
.Visible = True
.Presentations.Open "X:\data\CarShow.ppt"
.ActivePresentation.UpdateLinks
End With
Set ppt = Nothing
End Sub
Regards,
|
|

10-22-2003, 03:19 PM
|
|
Senior Contributor
|
|
Join Date: Jul 2003
Posts: 1,022
|
|
I tried similar code to that, but not exactly that, so give it a shot.
I also looked in the regular help, and I don't think there is a setting to configure this in PowerPoint to happen without code. - I looked around in options too and saw nothing. Try it yourself though, incase I misunderstood.
Edit: Cool ajc  - That successfully runs.(as you probably already knew. - Hopefully one of our ideas also successfully Udates the Links 
|
Last edited by tboltfrank; 10-22-2003 at 03:34 PM.
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|
|
|
 |
|