PowerPoint
A family of Microsoft presentation graphics products that offer tools for creating presentations and adding graphic effects like multimedia objects and special effects with text.
304 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Dear person,
I wrote some VBA code to automate powerpoint slides per row of my excel file.
Everything works great so far, only thing is that I would like to change the colour of the bullett point that is created with the Placeholder(2) line. Also how can I make it so that some of the DataRow.Cells are printed bold/italics?
I have tried looking online but the code seems so different, I have no idea how to make us of it.
Code:
Option Explicit
'reference to PPTX via een sub routine
Sub Powerpointmkn()
Dim DataRange As Range
Dim DataRow As Range
Dim ppt As PowerPoint.Application
Dim Presentation As PowerPoint.Presentation
Dim Slide As PowerPoint.Slide
Set ppt = New PowerPoint.Application
Set Presentation = ppt.Presentations.Add
ppt.Visible = True
Set DataRange = Range("A1:H23")
For Each DataRow In DataRange.Rows
Set Slide = Presentation.Slides.AddSlide(Presentation.Slides.Count + 1, Presentation.SlideMaster.CustomLayouts(2))
Slide.Shapes.Title.TextFrame.TextRange.Text = DataRow.Cells(1, 8) & " " & DataRow.Cells(1, 1) & " " & DataRow.Cells(1, 2)
Slide.Shapes.Placeholders(2).TextFrame.TextRange.Text = DataRow.Cells(1, 7) & " " & DataRow.Cells(1, 5) & " " & DataRow.Cells(1, 3) & " " & DataRow.Cells(1, 4)
Next DataRow
End Sub