Here is my script for all tables in a document. Had to rearrange the order of certain things. But this below works for me
For this bellow script, I've created for the Last Row:
Code:
Dim xTbl As Table
Dim sVar1 As WdLineWidth 'For the Last Row: Value to put as Top Border
Dim sVar2 As WdLineWidth 'For the Last Row: Value to put as Bottom Border
Dim LineWidth As Borders
sVar1 = InputBox("Last Row - Enter the size value from the below choices before the symbole = for the Top Border." _
& vbCr & "Exemple : 2 =0.25/ 4 =0.50/ 6 =0.75/ 8 =1.00/" _
& vbCr & "12 =1.50/ 18 =2.25/ 24 =3.00/ 36 =4.50/ 48 =6.00.", "SUGGESTION", "8")
sVar2 = InputBox("Last Row - Enter the size value from the below choices before the symbole = for the Bottom Border." _
& vbCr & "Exemple : 2 =0.25/ 4 =0.50/ 6 =0.75/ 8 =1.00/" _
& vbCr & "12 =1.50/ 18 =2.25/ 24 =3.00/ 36 =4.50/ 48 =6.00.", "SUGGESTION", "18")
For Each xTbl In ActiveDocument.Tables
xTbl.Rows.Last.Range.Select
With Selection.Range
With .Borders(wdBorderTop)
.LineStyle = wdLineStyleSingle
.LineWidth = sVar1
.Color = wdColorAutomatic
End With
With .Borders(wdBorderBottom)
.LineStyle = wdLineStyleSingle
.LineWidth = sVar2
.Color = wdColorAutomatic
End With
End With
Next xTbl
On Error GoTo 0
Hopefully it works for others on their PC's.
Cendrinne