Solved

Convert data to individual slides

Posted on 2013-05-23
3
279 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Many programs have tried to outwit PowerPoint in terms of technology and skill. These programs, however, still lack several characteristics that PowerPoint has possessed from the start. Here's why PowerPoint replacements won't entirely work for desi…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
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…

920 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

16 Experts available now in Live!

Get 1:1 Help Now