I am working on adding a chart to a powerpoint 2007 slide in c++ and everything is adding but I cannot find out how to change the font
size
. If anyone knows how to do this for powerpoint 2007 or know where to find a solution, that would be great thanks
Asked
Active
Viewed 455 times
0

Dave Clemmer
- 3,741
- 12
- 49
- 72

coynep1
- 45
- 1
- 8
1 Answers
0
Your table is a shape. The shape has a .Table method that returns a Table object.
To set the text size, use something like this (in VB/VBA-speak):
With oTbl ' a reference to the table object
For x = 1 to .Rows.Count
For y = 1 to .Columns.count
With .Cell(x,y).Shape.TextFrame.TextRange
.Font.Size = 8 ' or whatever you want
End with
Next
Next
End With
If the table cell's height/width aren't large enough to accommodate the newly sized text, the text won't change size. Annoying.

Steve Rindsberg
- 3,470
- 1
- 16
- 10