Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello.
I'm trying to input, process, and graph some data points from in a text file, and then paste the resultant graph into a new, blank, PowerPoint presentation. I have all of that working except for the very lats step, pasting the chart to PowerPoint. I'm trying to do this all from the VBA code stream in Excel. The module that handles the creation of the PowerPoint instance and new first slide is this: ************* Sub sbPowerPoint() 'create a PowerPoint session Set objPP = CreateObject("PowerPoint.Application") objPP.Visible = True objPP.Presentations.Add WithWindow:=msoTrue objPP.Presentations(1).Slides.Add Index:=1, Layout:=1 Set objPPSlide = objPP.Presentations(1).Slides(1) chtData.CopyPicture End Sub ************* In PowerPoint, the recorded code says that the past method would be: ActiveWindow.View.Paste I've tried that, and several other edited attempts using my objPP and objPPSlide objects, to get that to paste, but havent found one that works. Can someone explain to me what command it is that I need to use, syntactically? Thanks, Mark |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I would try
Sub sbPowerPoint() 'create a PowerPoint session Set objPP = CreateObject("PowerPoint.Application") objPP.Visible = True objPP.Presentations.Add WithWindow:=msoTrue objPP.Presentations(1).Slides.Add Index:=1, Layout:=1 Set objPPSlide = objPP.Presentations(1).Slides(1) chtData.CopyPicture objPPSlide.Shapes.Paste End Sub -- Regards, Tom Ogilvy "mark" wrote in message ... Hello. I'm trying to input, process, and graph some data points from in a text file, and then paste the resultant graph into a new, blank, PowerPoint presentation. I have all of that working except for the very lats step, pasting the chart to PowerPoint. I'm trying to do this all from the VBA code stream in Excel. The module that handles the creation of the PowerPoint instance and new first slide is this: ************* Sub sbPowerPoint() 'create a PowerPoint session Set objPP = CreateObject("PowerPoint.Application") objPP.Visible = True objPP.Presentations.Add WithWindow:=msoTrue objPP.Presentations(1).Slides.Add Index:=1, Layout:=1 Set objPPSlide = objPP.Presentations(1).Slides(1) chtData.CopyPicture End Sub ************* In PowerPoint, the recorded code says that the past method would be: ActiveWindow.View.Paste I've tried that, and several other edited attempts using my objPP and objPPSlide objects, to get that to paste, but havent found one that works. Can someone explain to me what command it is that I need to use, syntactically? Thanks, Mark |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
objPPSlide.Shapes.Paste
Thanks, Tom. After working on that earlier, I went out for a bike ride, and during that, was thinking I probably needed to do something with the shapes property of the slide object. I'm not very familiar at all with the PowerPoint objects. I see that that pastes the graph in the upper left... makes sense... I think I'll be alright with the code to reposition it. Thanks for your help! Mark |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Fix poor image quality when pasting from excel to powerpoint? | Charts and Charting in Excel | |||
How do I save colors when pasting from excel to powerpoint? | Excel Discussion (Misc queries) | |||
Pasting Charts from Excel to PowerPoint | Excel Programming | |||
Pasting excel chart into powerpoint | Charts and Charting in Excel | |||
pasting excel data in a powerpoint slide | Excel Discussion (Misc queries) |