Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 46
Default excel VBA for auto open PowerPoint

I know it can be done. I had the code once. Anyway, I can copy and paste
excel to Powerpoint with an excel macro.. But I want the powerpoint to launch
from excel as if you clicked on the PPT icon...
Any ideas...
Thanks
DJ
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default excel VBA for auto open PowerPoint

Hi Duncan

Try this

Dim pwp As Object
Set pwp = CreateObject("PowerPoint.Application")
pwp.Visible = True
pwp.presentations.Open Filename:="c:\test.ppt"


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Duncan_J" wrote in message ...
I know it can be done. I had the code once. Anyway, I can copy and paste
excel to Powerpoint with an excel macro.. But I want the powerpoint to launch
from excel as if you clicked on the PPT icon...
Any ideas...
Thanks
DJ



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default excel VBA for auto open PowerPoint

Can this same concept be used to open a specific Excel file from with in
Access?

Thanks,
Koataus

"Ron de Bruin" wrote:

Hi Duncan

Try this

Dim pwp As Object
Set pwp = CreateObject("PowerPoint.Application")
pwp.Visible = True
pwp.presentations.Open Filename:="c:\test.ppt"


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Duncan_J" wrote in message ...
I know it can be done. I had the code once. Anyway, I can copy and paste
excel to Powerpoint with an excel macro.. But I want the powerpoint to launch
from excel as if you clicked on the PPT icon...
Any ideas...
Thanks
DJ




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 46
Default excel VBA for auto open PowerPoint

Hi Ron!
I pocked around and found this code which works great.

Sub Chart2PPT()
Dim objPPT As Object
Dim objPrs As Object
Dim shtTemp As Worksheet
Dim chtTemp As ChartObject
Dim intSlide As Integer

Set objPPT = CreateObject("Powerpoint.application")
objPPT.Visible = True
objPPT.presentations.Open ThisWorkbook.Path & "\Pres.ppt"
objPPT.ActiveWindow.ViewType = 1 'ppViewSlide

For Each shtTemp In ThisWorkbook.Worksheets
For Each chtTemp In shtTemp.ChartObjects
intSlide = intSlide + 1
chtTemp.CopyPicture
If intSlide objPPT.presentations(1).Slides.Count Then
objPPT.ActiveWindow.View.GotoSlide
Index:=objPPT.presentations(1).Slides.Add(Index:=i ntSlide,
Layout:=1).SlideIndex
End If
objPPT.ActiveWindow.View.Paste
Next
Next
objPPT.presentations(1).Save
objPPT.Quit

Set objPrs = Nothing
Set objPPT = Nothing
End Sub

Thanks though
DJ

"Ron de Bruin" wrote:

Hi Duncan

Try this

Dim pwp As Object
Set pwp = CreateObject("PowerPoint.Application")
pwp.Visible = True
pwp.presentations.Open Filename:="c:\test.ppt"


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Duncan_J" wrote in message ...
I know it can be done. I had the code once. Anyway, I can copy and paste
excel to Powerpoint with an excel macro.. But I want the powerpoint to launch
from excel as if you clicked on the PPT icon...
Any ideas...
Thanks
DJ




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 46
Default excel VBA for auto open PowerPoint

Ron, I did test yours and yours works as well
Thanks again

"Ron de Bruin" wrote:

Hi Duncan

Try this

Dim pwp As Object
Set pwp = CreateObject("PowerPoint.Application")
pwp.Visible = True
pwp.presentations.Open Filename:="c:\test.ppt"


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Duncan_J" wrote in message ...
I know it can be done. I had the code once. Anyway, I can copy and paste
excel to Powerpoint with an excel macro.. But I want the powerpoint to launch
from excel as if you clicked on the PPT icon...
Any ideas...
Thanks
DJ






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default excel VBA for auto open PowerPoint


Try this Koataus

Sub test()
On Error Resume Next
Set xl = GetObject(, "Excel.Application")
If xl Is Nothing Then
Set xl = GetObject("", "Excel.Application")
xl.workbooks.Open "c:\Data\book1.xls"
xl.UserControl = True
xl.Visible = True
End If
AppActivate "Microsoft Excel"
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Koataus" wrote in message ...
Can this same concept be used to open a specific Excel file from with in
Access?

Thanks,
Koataus

"Ron de Bruin" wrote:

Hi Duncan

Try this

Dim pwp As Object
Set pwp = CreateObject("PowerPoint.Application")
pwp.Visible = True
pwp.presentations.Open Filename:="c:\test.ppt"


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Duncan_J" wrote in message ...
I know it can be done. I had the code once. Anyway, I can copy and paste
excel to Powerpoint with an excel macro.. But I want the powerpoint to launch
from excel as if you clicked on the PPT icon...
Any ideas...
Thanks
DJ






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel won't open when editing powerpoint graph Fuzzy001 Excel Discussion (Misc queries) 1 January 15th 10 04:24 PM
Can't open PowerPoint files Carl Goodin Excel Discussion (Misc queries) 2 December 14th 07 08:40 PM
office 07: auto powerpoint charts using named range data in excel robert2b Charts and Charting in Excel 0 November 28th 07 11:15 PM
Word, Excel and PowerPoint look for my printer before they open, w Poobabe Excel Discussion (Misc queries) 2 September 7th 07 05:18 PM
Open Powerpoint Presentation via Excel VBA code hurlbut777 Excel Programming 3 January 7th 05 12:42 AM


All times are GMT +1. The time now is 07:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"