A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Hi,
Got it.
At the top of your macro, add:
Dim rng As Excel.Range, c As Excel.Range
then change the bottom part of your macro as follows:
With pptShpPH.TextFrame.TextRange
'Get the text to the right of the chart:
Set rng = Range(Cells(chtObj.TopLeftCell.Row, "J"), Cells(chtObj.BottomRightCell.Row, "J"))
For Each c In rng 'loop through each cell in column J next to the chart...
If c.Value <> "" And c.Value <> "Callouts:" Then
.InsertAfter (c.Value & vbNewLine)
End If
Next c
'Change the font size of the PlaceHolder:
.Font.Size = 16
End With
Next chtObj
Make sense?
Also, when I tested your code, I already had ppt open with some other presentations. Your line:
If ppt.Presentations.Count = 0 Then ppt.Presentations.Add
meant that your charts were added to the end of an existing presentation (oops!). Maybe that's what you want, but unless you want to have to be in control of what presentations are open, I would remove the If test from that line and just add a new presentation each time (ppt.Presentations.Add).
Hope that helps.
Cheers
Rich