Change colour of bullet point and make text bold/italics

Rabea nopes 0 Reputation points
2023-05-16T09:33:18.7833333+00:00

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
PowerPoint
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
Excel
Excel
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
1,961 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,983 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.