question

BetterThanYesterday-3349 avatar image
0 Votes"
BetterThanYesterday-3349 asked BetterThanYesterday-3349 edited

powerpoint vba / how to make table borderline thinner ?

How to make borderline of table thinner ?

With .Borders(ppBorderLeft).Weight=1
----> it's thick to me

Thanks in advance...



'#################################### BEGIN
Public Sub test11()
Dim vROW As Integer
Dim vCOL, vG As Integer
Dim vTbl As Table
Dim vTBLWIDTH, vTBLLEFT, vHEADERFONTSIZE, vHEADERLINECNT, vBODYFONTSIZE, vTBLROWHIEGHT, vLINEWEIGHT As Long
'Dim vColorHeader, vCOLORNONHEADER1, vCOLORNONHEADER2 As ColorFormat
Dim vColorHeader1, vColorHeader2, vColorNonHeader1, vColorNonHeader2, vColorBorder, vFontColor As Long
Dim vFontNameHeader, vFontNameNonHeader As String

'/---------------------------- variable -----------------------------------
vLINEWEIGHT = 1
vColorHeader1 = RGB(38, 38, 115)
vColorHeader2 = RGB(189, 216, 255)
vColorNonHeader1 = RGB(235, 245, 255) '''''''''lighter
vColorNonHeader2 = RGB(217, 236, 255)
vColorBorder = vColorHeader1
'---------------------------- variable -----------------------------------
/

Set vTbl = ActiveWindow.Selection.ShapeRange(1).Table 'Only works is a single table shape is selected - add some checks in your final code!
For vROW = 1 To vTbl.Rows.Count
For vCOL = 1 To vTbl.Columns.Count
With vTbl.Cell(vROW, vCOL)
''''''''''''''''''''' Border
With .Borders(ppBorderTop)
.ForeColor.RGB = vColorBorder
.Weight = vLINEWEIGHT
End With
With .Borders(ppBorderBottom)
.ForeColor.RGB = vColorBorder
.Weight = vLINEWEIGHT
End With
With .Borders(ppBorderLeft)
.ForeColor.RGB = vColorBorder
.Weight = vLINEWEIGHT
End With
With .Borders(ppBorderRight)
.ForeColor.RGB = vColorBorder
.Weight = vLINEWEIGHT
End With
End With
Next 'vROW
Next 'vCOL
End Sub

'#################################### END

office-vba-dev
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

Viorel-1 avatar image
0 Votes"
Viorel-1 answered BetterThanYesterday-3349 edited

Try .Weight = 0.2 or .Weight = 0.1.


· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Env

ms office 2016
windows10 pro

IIt doesn't work


.Weight =0.1~0.5 makes no borderlines
.Weight =0.6~0.9 doesn't makes difference with .Weight =1

0 Votes 0 ·