• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Merge excel list into Powerpoint?

thailesam

New Member
Is there a way to take a list in excel and convert it to a powerpoint slide show? I have a list of veteran's names in excel and I want each of their names to be displayed individually as a slide in powerpoint, but I don't know how to do this.


Thanks.
 
Good evening thailesam

PowerPoint lets you import spreadsheets directly in to a slide. You say you have a list of names, if so the you would need to set this up in excel to allow you to import each name separately, not knowing the number I would say it may be quicker to enter the names yourself directly in to the slides
 
Borrowing the idea from here, and modifying

http://chandoo.org/wp/2011/08/03/create-powerpoint-presentations-using-excel-vba/


I think we can modify Drew's code like so:

[pre]
Code:
Sub CreatePowerPoint()

'Add a reference to the Microsoft PowerPoint Library by:
'1. Go to Tools in the VBA menu
'2. Click on Reference
'3. Scroll down to Microsoft PowerPoint X.0 Object Library, check the box, and press Okay

'First we declare the variables we will be using
Dim newPowerPoint As PowerPoint.Application
Dim activeSlide As PowerPoint.Slide
Dim cht As Excel.ChartObject

'Look for existing instance
On Error Resume Next
Set newPowerPoint = GetObject(, "PowerPoint.Application")
On Error GoTo 0

'Let's create a new PowerPoint
If newPowerPoint Is Nothing Then
Set newPowerPoint = New PowerPoint.Application
End If
'Make a presentation in PowerPoint
If newPowerPoint.Presentations.Count = 0 Then
newPowerPoint.Presentations.Add
End If

'Show the PowerPoint
newPowerPoint.Visible = True

'====================
'edit by Luke M
'Chanding this to loop through each cell within the selected range
'Loop through each chart in the Excel worksheet and paste them into the PowerPoint
'    For Each cht In ActiveSheet.ChartObjects
'
For Each c In Selection
'=====================

'Add a new slide where we will paste the chart
newPowerPoint.ActivePresentation.Slides.Add newPowerPoint.ActivePresentation.Slides.Count + 1, ppLayoutText
newPowerPoint.ActiveWindow.View.GotoSlide newPowerPoint.ActivePresentation.Slides.Count
Set activeSlide = newPowerPoint.ActivePresentation.Slides(newPowerPoint.ActivePresentation.Slides.Count)

'Copy the chart and paste it into the PowerPoint as a Metafile Picture
c.Select
c.Copy
activeSlide.Shapes.PasteSpecial(DataType:=ppPasteMetafilePicture).Select

'====================
'edit by Luke M
'ignore next lines, as we don't need a header
'Set the title of the slide the same as the title of the chart
'        activeSlide.Shapes(1).TextFrame.TextRange.Text = cht.Chart.ChartTitle.Text
'=====================

'Adjust the positioning of the Chart on Powerpoint Slide
newPowerPoint.ActiveWindow.Selection.ShapeRange.Left = 15
newPowerPoint.ActiveWindow.Selection.ShapeRange.Top = 125

activeSlide.Shapes(2).Width = 200
activeSlide.Shapes(2).Left = 505

Next

AppActivate ("Microsoft PowerPoint")
Set activeSlide = Nothing
Set newPowerPoint = Nothing

End Sub
[/pre]
Don't forget that you'll need to add a Reference to the Microsoft PowerPoint library within the VBE (Drew's article shows how to do it). Hopefully this gives you a good starting point.
 
Another alternate method is build the slides in XL, then create the PowerPoint

http://datapigtechnologies.com/blog/index.php/creating-a-powepoint-deck-in-excel/
 
Back
Top