• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2186
  • Last Modified:

add double border to table cell in PowerPoint 2007

Hi! I'm trying to format a table cell with a double line border in PowerPoint 2007. I do not see a way to do this without using VBA. My ultimate goal is to provide a macro that recognizes a selected/highlighted cell within a table and adds a double border to it. Any help would be greatly appreciated.
1 Solution
Maybe something along these lines

Sub Border_Doubler()
Dim iRow As Integer
Dim iCol As Integer
Dim iBorder As Integer
Dim otbl As Table
On Error Resume Next
'Table Cells must be selected!
Set otbl = ActiveWindow.Selection.ShapeRange(1).Table
For iRow = 1 To otbl.Rows.Count
For iCol = 1 To otbl.Columns.Count
If otbl.Cell(iRow, iCol).Selected Then
For iBorder = 1 To 4
otbl.Cell(iRow, iCol).Borders(iBorder).Visible = msoTrue
With otbl.Cell(iRow, iCol).Borders(iBorder)
.Weight = 3
.ForeColor.RGB = vbBlack
.Style = msoLineThinThin
.Visible = True
End With
Next iBorder
End If
Next iCol
Next iRow
End Sub

Open in new window

behestAuthor Commented:
Thank you! Now I understand the iborder = 1 to 4 (or 1 to 6). Greatly appreciated!!!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now