dshrenik
asked on
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!
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!
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
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
ASKER
Thanks! Can you tell me how one can change (increase) the left and right margins of a table cell.
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.ActivePresenta tion.Slide s(1).Shape s(3).Table
to
With Application.ActivePresenta tion.Slide s(1).Shape s("fred"). Table
Chris
Find your table and change the name for example to Fred
Modify the selection in the earlier code from:
With Application.ActivePresenta
to
With Application.ActivePresenta
Chris
Via the application or VBA?
ASKER
I'm not particular about the method.
ASKER
Whichever is easier.
INteractive note the draw borders pane requires the table to be selected then the design tab activated
Chris
Chris
Easiest is probably VBA since we can read the current setting. To do this replace:
.Weight = 5
with
.Weight = .Weight + 1
Chris
.Weight = 5
with
.Weight = .Weight + 1
Chris
ASKER
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.
Basically, I want to increase the left, right, bottom and top padding inside a cell.
Select the table, layout cell margins
ASKER
How do I get layout?
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
Selecting a range of cells adjusts for all of the selected cells
Chris
ASKER
I'm sorry, can you give me a step by step procedure. Where do I find cell margins?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks!
Sorry I missed the difference between the margin and border requests, but glad it helped in the end.
Chris
Chris
ASKER
If possible, please answer this question:
https://www.experts-exchange.com/questions/26965458/Change-color.html?anchorAnswerId=35430944#a35430944
https://www.experts-exchange.com/questions/26965458/Change-color.html?anchorAnswerId=35430944#a35430944
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
Chris
ASKER
Sure. I dont mind using VBA.
Now click the mouse on the top or left/right borsers where you want the line.
Chris