Hi all!
Really simple thing to get stuck on but......
I have an excel file to sort a large data set into spearate sections for each category. I then want to paste the data into the relevant text box in an existing template in Powerpoint.
I have got the code to open the Powerpoint presentation and copy the data range, but I am really struggling to paste the cells into the right text boxes. E.g. cell range A1:A5 need to go into text box 1, B1:B5 into text box 2 etc. I know it will be something really simple and obvious but it's driving me mad!
I am guessing it will all come down to the 'Set oPPTShape = oPPTFile.Slides(SlideNum).Shapes' part of the code? Any help would be hugely appreciated!
Dim oPPTApp As PowerPoint.Application
Dim oPPTFile As PowerPoint.Presentation
Dim oPPTShape As PowerPoint.Shape
Dim oPPTSlide As PowerPoint.Slide
Set oPPTApp = CreateObject("PowerPoint.Application")
oPPTApp.Visible = msoTrue
Set oPPTFile = oPPTApp.Presentations.Open(Filename:="myfilename")
Dim SlideNum As Integer
SlideNum = 15
oPPTFile.Slides(SlideNum).Select
Set oPPTShape = oPPTFile.Slides(SlideNum).Shapes
Really simple thing to get stuck on but......
I have an excel file to sort a large data set into spearate sections for each category. I then want to paste the data into the relevant text box in an existing template in Powerpoint.
I have got the code to open the Powerpoint presentation and copy the data range, but I am really struggling to paste the cells into the right text boxes. E.g. cell range A1:A5 need to go into text box 1, B1:B5 into text box 2 etc. I know it will be something really simple and obvious but it's driving me mad!
I am guessing it will all come down to the 'Set oPPTShape = oPPTFile.Slides(SlideNum).Shapes' part of the code? Any help would be hugely appreciated!
Dim oPPTApp As PowerPoint.Application
Dim oPPTFile As PowerPoint.Presentation
Dim oPPTShape As PowerPoint.Shape
Dim oPPTSlide As PowerPoint.Slide
Set oPPTApp = CreateObject("PowerPoint.Application")
oPPTApp.Visible = msoTrue
Set oPPTFile = oPPTApp.Presentations.Open(Filename:="myfilename")
Dim SlideNum As Integer
SlideNum = 15
oPPTFile.Slides(SlideNum).Select
Set oPPTShape = oPPTFile.Slides(SlideNum).Shapes