Hello Dear All,
My question has nothing to do with spss .Just I though maybe you have this experince and you can help me. I already expoerted spss output to excel .I used macro to generate several charts inside of excel sheet.Now I want to copy these charts and paste into powerpoint slides which has its own fromat. In fact I want to copy each chart in each separate slide automatically. Is there anybody who has this experince already? I would be thankful . Thanks, Behnaz _________________________________________________________________ FREE pop-up blocking with the new MSN Toolbar - get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/ |
Sorry for the delay repsonding to this thread;
A rough bit of code is the following, it will take the chart and paste it into powerpoint as a picture. Mike Sub ChartsToPresentation() ' Set a VBE reference to Microsoft PowerPoint Object Library ' copy chart as a picture ActiveSheet.ChartObjects(1).Chart.CopyPicture _ Appearance:=xlScreen, Size:=xlScreen, Format:=xlPicture ' Add a new slide and paste in the chart SlideCount = PPPres.Slides.Count Set PPSlide = PPPres.Slides.Add(SlideCount + 1, ppLayoutBlank) PPApp.ActiveWindow.View.GotoSlide PPSlide.SlideIndex With PPSlide ' paste and select the chart picture .Shapes.Paste.Select ' align the chart PPApp.ActiveWindow.Selection.ShapeRange.Align msoAlignCenters, True PPApp.ActiveWindow.Selection.ShapeRange.Align msoAlignMiddles, True End With ' Clean up Set PPSlide = Nothing End Sub -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of behnaz shirazi Sent: 19 February 2007 16:46 To: [hidden email] Subject: Copy each chart into each ppt slide automatically using VB Hello Dear All, My question has nothing to do with spss .Just I though maybe you have this experince and you can help me. I already expoerted spss output to excel .I used macro to generate several charts inside of excel sheet.Now I want to copy these charts and paste into powerpoint slides which has its own fromat. In fact I want to copy each chart in each separate slide automatically. Is there anybody who has this experince already? I would be thankful . Thanks, Behnaz _________________________________________________________________ FREE pop-up blocking with the new MSN Toolbar - get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/ ________________________________________________________________________ This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________ ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ |
Hello Mike,
Thank you for your reply .These codes are very useful and I had tried them before.My problem is that I Don't want to add new slides I want to have my own slides .I want to copy each picture into each slide which I have them already. Do you have any code for this case? Thanks again Behnaz >From: Michael Pearmain <[hidden email]> >Reply-To: Michael Pearmain <[hidden email]> >To: [hidden email] >Subject: Re: Copy each chart into each ppt slide automatically using VB >Date: Thu, 22 Feb 2007 11:49:55 -0000 > >Sorry for the delay repsonding to this thread; > >A rough bit of code is the following, it will take the chart and paste >it into powerpoint as a picture. > >Mike > >Sub ChartsToPresentation() >' Set a VBE reference to Microsoft PowerPoint Object Library > > ' copy chart as a picture > ActiveSheet.ChartObjects(1).Chart.CopyPicture _ > Appearance:=xlScreen, Size:=xlScreen, Format:=xlPicture > > ' Add a new slide and paste in the chart > SlideCount = PPPres.Slides.Count > Set PPSlide = PPPres.Slides.Add(SlideCount + 1, ppLayoutBlank) > PPApp.ActiveWindow.View.GotoSlide PPSlide.SlideIndex > With PPSlide > ' paste and select the chart picture > .Shapes.Paste.Select > ' align the chart > PPApp.ActiveWindow.Selection.ShapeRange.Align msoAlignCenters, >True > PPApp.ActiveWindow.Selection.ShapeRange.Align msoAlignMiddles, >True > End With > >' Clean up >Set PPSlide = Nothing > >End Sub > >-----Original Message----- >From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of >behnaz shirazi >Sent: 19 February 2007 16:46 >To: [hidden email] >Subject: Copy each chart into each ppt slide automatically using VB > >Hello Dear All, > >My question has nothing to do with spss .Just I though maybe you have >this >experince and you can help me. >I already expoerted spss output to excel .I used macro to generate >several >charts inside of excel sheet.Now I want to copy these charts and paste >into >powerpoint slides which has its own fromat. >In fact I want to copy each chart in each separate slide automatically. > >Is there anybody who has this experince already? > >I would be thankful . > >Thanks, >Behnaz > >_________________________________________________________________ >FREE pop-up blocking with the new MSN Toolbar - get it now! >http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/ > >________________________________________________________________________ >This e-mail has been scanned for all viruses by Star. The >service is powered by MessageLabs. For more information on a proactive >anti-virus service working around the clock, around the globe, visit: >http://www.star.net.uk >________________________________________________________________________ > >______________________________________________________________________ >This email has been scanned by the MessageLabs Email Security System. >For more information please visit http://www.messagelabs.com/email >______________________________________________________________________ _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ |
Free forum by Nabble | Edit this page |