Solved

Convert data to individual slides

Posted on 2013-05-23
3
268 Views
Last Modified: 2013-08-22
Hello, I have 3 columns and 300 rows in excel, and I need each row to be its own slide, so i would have 300 slides.

It would looke like the

Column 1
Column 2
Column 3

I know there is an easy solution, I don't even think I need VBA, I am actually hoping to avoid it all together, I am thinking somehting more like a mail merge, but I cannot find that function in PPT.
0
Comment
Question by:Frankkadaf
3 Comments
 
LVL 39

Expert Comment

by:nutsch
ID: 39192604
I don't think there's an easy solution, and VBA might have to do it. Try something like this, after adding a reference to the microsoft powerpoint object library.


Option Explicit


Sub sendDataToPowerpoint()
Dim lLoop As Long, shtOrg As Worksheet, shtTemp As Worksheet
Dim oPPTApp As PowerPoint.Application, oPPTPres As PowerPoint.Presentation

Set oPPTApp = CreateObject("PowerPoint.Application")
Set oPPTPres = oPPTApp.Presentations.Add(msoTrue)

'turn off updates to speed up code execution
With Application
    .ScreenUpdating = False
    .EnableEvents = False
    .Calculation = xlCalculationManual
    .DisplayAlerts = False
End With

Set shtOrg = ActiveSheet
Set shtTemp = Sheets.Add

For lLoop = 1 To 300
    shtOrg.Cells(lLoop, 1).Resize(1, 3).Copy
    shtTemp.Cells(1, 1).PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
        False, Transpose:=True
    shtTemp.Columns(1).AutoFit
    sendToPowerpoint shtTemp.Range("A1:A3"), oPPTApp, oPPTPres

Next lLoop

shtTemp.Delete

With Application
    .ScreenUpdating = True
    .EnableEvents = True
    .Calculation = xlCalculationAutomatic
    .DisplayAlerts = True
End With

End Sub



Sub sendToPowerpoint(rgCopy As Range, oPPTApp As PowerPoint.Application, oPPTPres As PowerPoint.Presentation)

Dim oPPTSlide As PowerPoint.Slide
Dim oPPTShape As Object, CommentIndicator As Long, blDisplayGridlines As Boolean, blArr(1 To 10) As Boolean

rgCopy.Copy

oPPTApp.Visible = msoTrue
Set oPPTSlide = oPPTPres.Slides.Add(Index:=oPPTPres.Slides.Count + 1, Layout:=ppLayoutBlank)

oPPTApp.Activate

Set oPPTShape = oPPTSlide.Shapes.PasteSpecial(ppPasteEnhancedMetafile) 'change to suit needs

With oPPTShape
    If .Width > oPPTPres.SlideMaster.Width - 20 Then .Width = oPPTPres.SlideMaster.Width - 20
    If .Height > oPPTPres.SlideMaster.Height - 20 Then .Height = oPPTPres.SlideMaster.Height - 20
    .Left = (oPPTPres.SlideMaster.Width - .Width) / 2
    .Top = (oPPTPres.SlideMaster.Height - .Height) / 2
End With

Set oPPTSlide = Nothing

Application.CutCopyMode = False

End Sub

Open in new window

0
 
LVL 24

Expert Comment

by:Echo_S
ID: 39192805
There's not an easy way to do this in PPT, but there is an add-in already on the market for it: PPTMerge. Get it here: http://www.pptools.com/merge/index.html
0
 
LVL 16

Accepted Solution

by:
Jerry Paladino earned 500 total points
ID: 39194048
1)  Use WORD and EXCEL to create a MailMerge document to create the 300 pages.
2)  Open the Doc (Docx) file in Powerpoint as an Outline.

In the WORD mailmerge document, use the HEADING1 style for the Title of the slide and use the HEADING2 style for the body text of the slide.

http://office.microsoft.com/en-us/word-help/create-a-powerpoint-presentation-from-a-word-outline-HP005190174.aspx

This may give as bit more control over the slide layout and format.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Most folk recognise that Microsoft Excel, being a numbers-and-formulae-centric application attracts programmers due to the natural fit in mindset. Conversly, when opening Microsoft's dominant presentation creative application, few consider what…
Outline From PowerPoint 2010 it is possible to have shapes appear in front of video, in earlier versions video always played in front of other shapes. This means it is possible to have captions animated to appear in front of video. Users who h…
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now