Hello,
I've succeeded in writing a macro to populate PowerPoint table cells with text from Excel cells. The problem is, every now and then, I need to populate a PowerPoint table cell with the text from two Excel cells separated by a space and with two different fonts. I've managed to put the text from two Excel cells into a PowerPoint cell separated by a space and set the font for both using this
Dim col1 As String
col1 = Cells(x, 1)
Dim col2 As String
col2 = Cells(x, 2)
Dim col3 As String
col3 = Cells(x, 3)
Dim col4 As String
col4 = Cells(x, 4)
'Column 1 goes where
ppApp.ActivePresentation.Slides(x).Shapes("Table 1").Table.cell(1, 1).Shape.TextFrame.TextRange.Text = col1 & " " & col2
With ppApp.ActivePresentation.Slides(x).Shapes("Table 1").Table.cell(1, 1).Shape.TextFrame.TextRange.Font
.Size = 48
.Name = "Miriam"
.Bold = True
.Color.RGB = RGB(255, 127, 255)
End With
x is the loop through the PowerPoint slides, and col1, col2, etc. is the text that is copied from the cell in each respective column of the row.
Does anyone know how to make the fonts of the text col1 and col2 different?
Thank you kindly,
ML
Bookmarks