add double border to table cell in PowerPoint 2007

Posted on 2010-01-04
Medium Priority
Last Modified: 2012-06-21
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.
Question by:behest
LVL 23

Accepted Solution

JSRWilson earned 2000 total points
ID: 26178559
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


Author Closing Comment

ID: 31672634
Thank you! Now I understand the iborder = 1 to 4 (or 1 to 6). Greatly appreciated!!!

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever wonder what it's like to get hit by ransomware? "Tom" gives you all the dirty details first-hand – and conveys the hard lessons his company learned in the aftermath.
Quickbooks hosting can do wonders to your enterprise but considering the points elaborated in the article which will help you to better analyze the outcomes. So scan your business, its needs and then move to the new world of limitless benefits.
The viewer will learn how to  create a slide that will launch other presentations in Microsoft PowerPoint. In the finished slide, each item launches a new PowerPoint presentation and when each is finished it automatically comes back to this slide: …
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question