Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Convert data to individual slides

Posted on 2013-05-23
3
Medium Priority
?
311 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 25

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 1500 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
Microsoft's Excel has many features that most people will never need nor take advantage of.  Conditional formatting is one feature that you may find a necessity once you start using it.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

877 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