PowerPoint 2007 - Table Borders

T

TomW

I'm trying to figure out the VB command to add borders to a table in
PowerPoint 2007. Unfortunately, MS has removed the macro recorder
from PowerPoint 2007 which was my go-to method for figuring out this
kind of thing. The VB reference for 2007 is also not as user friendly
as for older versions. Here's what I had that worked on 2003 (note -
this is Perl code for automating PowerPoint) The four lines would add
the border to all sides of a single cell.

$myTable->Columns($cc)->Cells->Borders(ppBorderLeft)->{LineWidth} = .
5;
$myTable->Columns($cc)->Cells->Borders(ppBorderRight)->{LineWidth} = .
5;
$myTable->Columns($cc)->Cells->Borders(ppBorderTop)->{LineWidth} = .
5;
$myTable->Columns($cc)->Cells->Borders(ppBorderBottom)->{LineWidth}
= .5;

The above code snippet does not appear to do anything in Ppt 2007 and
there are no errors. The table is created and cell background are
filled correctly but there are no borders. Can anyone help ?

Thanks
 
J

John Wilson

perl's a mystery to me but in vba (where myTable is declared as Table)

With myTable
For n = 1 To 4
With .Cell(1, 1).Borders(n)
..Visible = True
..Weight = 2
..ForeColor.RGB = RGB(255, 0, 0)
End With
Next n
 
T

TomW

perl's a mystery to me but in vba (where myTable is declared as Table)

With myTable
For n = 1 To 4
With .Cell(1, 1).Borders(n)
.Visible = True
.Weight = 2
.ForeColor.RGB = RGB(255, 0, 0)
End With
Next n

Thanks all for your suggestions. It turns out the borders were
present but needed a color specified which was not needed in 2003.
For those who care about doing this in Perl the following works:
$myTable->Columns($cc)->Cells->Borders(ppBorderLeft)->Forecolor->{RGB}
= $RGBblack;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top