add double border to table cell in PowerPoint 2007

Posted on 2010-01-04
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

    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

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

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Setting the Scene PowerPoint is a creative tool in the right hands but it also includes a much underutilised programming dimension. In this beginner level article, we're going to show you some of some key elements of programming PowerPoint using th…
    Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
    The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
    The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…

    746 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

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now