Table border (PpwerPoint 2010)

Please tell me how once can increase the thickness of just the top border of a table.
Also, I want to change the left and right margins of a table cell.

If possible, please give me a step-by-step procedure. Thanks!
dshrenikAsked:
Who is Participating?
 
Chris BottomleyConnect With a Mentor Commented:
As soon as you select the table, the table tools | layout tab is presented.

On the tab select find the alignment pane and on that pane click the drop down for the cell margins button.  Now select the custom margin item and make your changes in the internal margins section then close back to your presentation.

Chris
0
 
Chris BottomleyCommented:
Set the cursor in the table, then on the draew borders pane, select the pen color, thickness etc then stoill on the same pane select the draw table button.\
Now click the mouse on the top or left/right borsers where you want the line.

Chris
0
 
Chris BottomleyCommented:
Alternatively select VBA, (alt + F11) followed by insert | Module


Now paste the following code therein

It set the top border to thickness 10, and incidentally changes the color but you can drop that if required

It then selects cell 4 in row 3 and sets the left and right borders to something else.  Modify the reference to the shape as appropriate, (the test slide had it as shape 3.

Chris
Sub topBorder()
Dim sh As Shape
    With Application.ActivePresentation.Slides(1).Shapes(3).Table
        With .Rows(1).Cells.Borders(ppBorderTop)
            .ForeColor.RGB = vbRed
            .Weight = 10
        End With
        With .Cell(3, 4).Borders(ppBorderLeft)
            .ForeColor.RGB = vbRed
            .Weight = 5
        End With
        With .Cell(3, 4).Borders(ppBorderRight)
            .ForeColor.RGB = vbGreen
            .Weight = 5
        End With
    End With
End Sub

Open in new window

0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
dshrenikAuthor Commented:
Thanks! Can you tell me how one can change (increase)  the left and right margins of a table cell.
0
 
Chris BottomleyCommented:
To simplify shape selection for VBA you can for example, select the slide using the cursor.  Now on the Home tab, editing pane select "select" ... "Selection pane" from the drop down.

Find your table and change the name for example to Fred

Modify the selection in the earlier code from:

    With Application.ActivePresentation.Slides(1).Shapes(3).Table
to

    With Application.ActivePresentation.Slides(1).Shapes("fred").Table

Chris
0
 
Chris BottomleyCommented:
Via the application or VBA?
0
 
dshrenikAuthor Commented:
I'm not particular about the method.
0
 
dshrenikAuthor Commented:
Whichever is easier.
0
 
Chris BottomleyCommented:
INteractive note the draw borders pane requires the table to be selected then the design tab activated

Chris
0
 
Chris BottomleyCommented:
Easiest is probably VBA since we can read the current setting.  To do this replace:


            .Weight = 5
with

            .Weight = .Weight + 1

Chris
0
 
dshrenikAuthor Commented:
I am sorry. I meant, how do I increase the left and right margins for the contents inside a table cell.
Basically, I want to increase the left, right, bottom and top padding inside a cell.
0
 
Chris BottomleyCommented:
Select the table, layout cell margins
0
 
dshrenikAuthor Commented:
How do I get layout?
0
 
Chris BottomleyCommented:
Apologies ... in the cell margins, select custom to display the cutrrent internal margins and to adjust them.

Selecting a range of cells adjusts for all of the selected cells

Chris
0
 
dshrenikAuthor Commented:
I'm sorry, can you give me a step by step procedure. Where do I find cell margins?
0
 
dshrenikAuthor Commented:
Thanks!
0
 
Chris BottomleyCommented:
Sorry I missed the difference between the margin and border requests, but glad it helped in the end.

Chris
0
 
dshrenikAuthor Commented:
0
 
Chris BottomleyCommented:
Looking at it but it's not so straight forward and will need VBA, (I believe) - if indeed it can be done at all!

Chris
0
 
dshrenikAuthor Commented:
Sure. I dont mind using VBA.
0
All Courses

From novice to tech pro — start learning today.