Trouble with Excel Charts
Hi, All Experts
I tried run Power Point and paste on it some Charts from excel with this code. Something is wrong and I don't what is. Thanks for your expert advice Sub RunPowerPoint_Automation() Dim PowerApp As PowerPoint.Application Dim PowerPres As PowerPoint.Presentation Set PowerApp = CreateObject("PowerPoint.Application") Set PowerPres = PowerApp.Presentations.Open _ ("C:\PowerTest.ppt") PowerApp.Visible = True PasteCharts Set PowerApp = Nothing End Sub |
Trouble with Excel Charts
Fernando -
Which line gives you the error? What is the error message? What doesn't happen that you expected to happen? Is the error in the PasteCharts routine? I have some hints on this topic he http://www.geocities.com/jonpeltier/Excel/XL_PPT.html - Jon ------- Jon Peltier, Microsoft Excel MVP http://www.geocities.com/jonpeltier/Excel/index.html _______ Fernando Ortiz wrote: Hi, All Experts I tried run Power Point and paste on it some Charts from excel with this code. Something is wrong and I don't what is. Thanks for your expert advice Sub RunPowerPoint_Automation() Dim PowerApp As PowerPoint.Application Dim PowerPres As PowerPoint.Presentation Set PowerApp = CreateObject("PowerPoint.Application") Set PowerPres = PowerApp.Presentations.Open _ ("C:\PowerTest.ppt") PowerApp.Visible = True PasteCharts Set PowerApp = Nothing End Sub |
Trouble with Excel Charts
Thanks Jon
This Excel macro try run Power Point and open Especific Presentation. In this presentation paste some Excel´s charts I work with Excel 2000 with Win XP When the macro runs stop in the line Set PowerPres = PowerApp.Presentations.Open _ ("C:\PowerTest.ppt") And prompt error like this "Presentations(Unknow member): Invalid request. The Power Point Frame Window does no exist" In a Microsoft Site I found this Excel macro code to automatized Word from Excel Sub RunWordMacro_Automation() Dim WordApp As Word.Application Dim WordDoc As Word.Document Set WordApp = CreateObject("Word.Application") Set WordDoc = WordApp.Documents.Open _ ("C:\Wordtest.doc") WordApp.Visible = True WordApp.Run "macro1" ' Uncomment the next line of code to print the document. ' WordDoc.PrintOut Background:=False ' Uncomment the next line of code to save the modified document. ' WordDoc.Save 'WordApp.Quit SaveChanges:=wdDoNotSaveChanges Set WordApp = Nothing End Sub This macro works fine and I try build a similar macro for work with Power Point Thanks a lot for your expert advice Regards, Fernando Ortiz "Jon Peltier" escribió en el mensaje ... Fernando - Which line gives you the error? What is the error message? What doesn't happen that you expected to happen? Is the error in the PasteCharts routine? I have some hints on this topic he http://www.geocities.com/jonpeltier/Excel/XL_PPT.html - Jon ------- Jon Peltier, Microsoft Excel MVP http://www.geocities.com/jonpeltier/Excel/index.html _______ Fernando Ortiz wrote: Hi, All Experts I tried run Power Point and paste on it some Charts from excel with this code. Something is wrong and I don't what is. Thanks for your expert advice Sub RunPowerPoint_Automation() Dim PowerApp As PowerPoint.Application Dim PowerPres As PowerPoint.Presentation Set PowerApp = CreateObject("PowerPoint.Application") Set PowerPres = PowerApp.Presentations.Open _ ("C:\PowerTest.ppt") PowerApp.Visible = True PasteCharts Set PowerApp = Nothing End Sub |
Trouble with Excel Charts
Hi Fernando,
Powerpoint needs to be visible, otherwise things start failing. From your original code snippet move the line PowerApp.Visible = True before the Open() command. Fernando Ortiz wrote: Thanks Jon This Excel macro try run Power Point and open Especific Presentation. In this presentation paste some Excel´s charts I work with Excel 2000 with Win XP When the macro runs stop in the line Set PowerPres = PowerApp.Presentations.Open _ ("C:\PowerTest.ppt") And prompt error like this "Presentations(Unknow member): Invalid request. The Power Point Frame Window does no exist" In a Microsoft Site I found this Excel macro code to automatized Word from Excel Sub RunWordMacro_Automation() Dim WordApp As Word.Application Dim WordDoc As Word.Document Set WordApp = CreateObject("Word.Application") Set WordDoc = WordApp.Documents.Open _ ("C:\Wordtest.doc") WordApp.Visible = True WordApp.Run "macro1" ' Uncomment the next line of code to print the document. ' WordDoc.PrintOut Background:=False ' Uncomment the next line of code to save the modified document. ' WordDoc.Save 'WordApp.Quit SaveChanges:=wdDoNotSaveChanges Set WordApp = Nothing End Sub This macro works fine and I try build a similar macro for work with Power Point Thanks a lot for your expert advice Regards, Fernando Ortiz "Jon Peltier" escribió en el mensaje ... Fernando - Which line gives you the error? What is the error message? What doesn't happen that you expected to happen? Is the error in the PasteCharts routine? I have some hints on this topic he http://www.geocities.com/jonpeltier/Excel/XL_PPT.html - Jon ------- Jon Peltier, Microsoft Excel MVP http://www.geocities.com/jonpeltier/Excel/index.html _______ Fernando Ortiz wrote: Hi, All Experts I tried run Power Point and paste on it some Charts from excel with this code. Something is wrong and I don't what is. Thanks for your expert advice Sub RunPowerPoint_Automation() Dim PowerApp As PowerPoint.Application Dim PowerPres As PowerPoint.Presentation Set PowerApp = CreateObject("PowerPoint.Application") Set PowerPres = PowerApp.Presentations.Open _ ("C:\PowerTest.ppt") PowerApp.Visible = True PasteCharts Set PowerApp = Nothing End Sub -- Cheers Andy http://www.andypope.info |
All times are GMT +1. The time now is 09:02 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com