T
Tim Witort
PowerPoint 2003 SP3
VFP 6 SP5
I am using automation via Visual FoxPro to build some
PowerPoint presentations. I have a basic slide already
prepared featuring a couple of textboxes and a table.
My automation code adds several rows to the table using:
loTbl.Rows.Add()
And fills the contents of the rows like so:
loRow = loTbl.Rows[loTbl.Rows.Count]
loRow.Cells[1].Shape.TextFrame.TextRange.Text = "some text"
After I have added the rows and populated them with the
desired text, I format the text like so:
lnRows = loTbl.Rows.Count
FOR lnCurRow = lnRows TO 1 STEP -1
FOR lnCurCol = 1 TO 7
WITH loTbl.Cell
(lnCurRow,lnCurCol).Shape.TextFrame.TextRange.Font
.Name = "Arial Narrow"
.Size = 12
.Bold = .F.
ENDWITH
ENDFOR
ENDFOR
Everything about this works fine except the Bold property.
When I examine the resulting presentation in PowerPoint, it
seems that the Bold property on some of the text in the table
has been applied and some has not. When I check the property
as I am setting it like so:
messagebox("Bold: "+TRANSFORM(.Bold))
It always correctly reports that the property is 0 (false).
Yet when the presentation is opened in PowerPoint, the first
row in the table is Bold rather than non-Bold.
Is there an additional method call I need to make so that
the font properties will "stick"? Could there be some aspect
of my starting slide file that is causing the font settings
problem?
-- TRW
_______________________________________
t i m . w i t o r t
_______________________________________
VFP 6 SP5
I am using automation via Visual FoxPro to build some
PowerPoint presentations. I have a basic slide already
prepared featuring a couple of textboxes and a table.
My automation code adds several rows to the table using:
loTbl.Rows.Add()
And fills the contents of the rows like so:
loRow = loTbl.Rows[loTbl.Rows.Count]
loRow.Cells[1].Shape.TextFrame.TextRange.Text = "some text"
After I have added the rows and populated them with the
desired text, I format the text like so:
lnRows = loTbl.Rows.Count
FOR lnCurRow = lnRows TO 1 STEP -1
FOR lnCurCol = 1 TO 7
WITH loTbl.Cell
(lnCurRow,lnCurCol).Shape.TextFrame.TextRange.Font
.Name = "Arial Narrow"
.Size = 12
.Bold = .F.
ENDWITH
ENDFOR
ENDFOR
Everything about this works fine except the Bold property.
When I examine the resulting presentation in PowerPoint, it
seems that the Bold property on some of the text in the table
has been applied and some has not. When I check the property
as I am setting it like so:
messagebox("Bold: "+TRANSFORM(.Bold))
It always correctly reports that the property is 0 (false).
Yet when the presentation is opened in PowerPoint, the first
row in the table is Bold rather than non-Bold.
Is there an additional method call I need to make so that
the font properties will "stick"? Could there be some aspect
of my starting slide file that is causing the font settings
problem?
-- TRW
_______________________________________
t i m . w i t o r t
_______________________________________