| |
' --------------------------------------------------------------------- ' Copyright ©1999-2007 Shyam Pillai. All Rights Reserved. ' --------------------------------------------------------------------- ' You are free to use this code within your own applications, add-ins, ' documents etc but you are expressly forbidden from selling or ' otherwise distributing this source code without prior consent. ' This includes both posting free demo projects made from this ' code as well as reproducing the code in text or html format. ' ---------------------------------------------------------------------
Option Explicit
Sub HowToUseIt()
Call SetTableBorder(ActivePresentation.Slides(1).Shapes(1).Table)
End Sub
Sub SetTableBorder(oTable As Table)
Dim I As Integer
With oTable
For I = 1 To .Rows.Count
With .Rows(I).Cells(1).Borders(ppBorderLeft)
.ForeColor.RGB = RGB(255, 0, 0)
.Weight = 5
End With
With .Rows(I).Cells(.Rows(I).Cells.Count).Borders(ppBorderRight)
.ForeColor.RGB = RGB(255, 0, 0)
.Weight = 5
End With
Next I
For I = 1 To .Columns.Count
With .Columns(I).Cells(1).Borders(ppBorderTop)
.ForeColor.RGB = RGB(255, 0, 0)
.Weight = 5
End With
With
.Columns(I).Cells(.Columns(I).Cells.Count).Borders(ppBorderBottom)
.ForeColor.RGB = RGB(255, 0, 0)
.Weight = 5
End With
Next I
End With
End Sub
|