InsideLineStyle Property

Microsoft Word Visual Basic

WdLineStyle can be one of these WdLineStyle constants.
wdLineStyleDashDot
wdLineStyleDashDotDot
wdLineStyleDashDotStroked
wdLineStyleDashLargeGap
wdLineStyleDashSmallGap
wdLineStyleDot
wdLineStyleDouble
wdLineStyleDoubleWavy
wdLineStyleEmboss3D
wdLineStyleEngrave3D
wdLineStyleInset
wdLineStyleNone
wdLineStyleOutset
wdLineStyleSingle
wdLineStyleSingleWavy
wdLineStyleThickThinLargeGap
wdLineStyleThickThinMedGap
wdLineStyleThickThinSmallGap
wdLineStyleThinThickLargeGap
wdLineStyleThinThickMedGap
wdLineStyleThinThickSmallGap
wdLineStyleThinThickThinLargeGap
wdLineStyleThinThickThinMedGap
wdLineStyleThinThickThinSmallGap
wdLineStyleTriple

expression.InsideLineStyle

expression    Required. An expression that returns a Border object.

Remarks

True sets the line style to the default line style and the line width to the default line width. The default line style and line width can be set using the DefaultBorderLineWidth and DefaultBorderLineStyle properties.

Use either of the following instructions to remove the inside border from the first table in the active document.

ActiveDocument.Tables(1).Borders.InsideLineStyle = wdLineStyleNone
ActiveDocument.Tables(1).Borders.InsideLineStyle = False
		

Example

This example adds borders between rows and between columns in the first table of the active document.

Dim tableTemp As Table

If ActiveDocument.Tables.Count >= 1 Then
    Set tableTemp = ActiveDocument.Tables(1)
    tableTemp.Borders.InsideLineStyle = True
End If
		

This example adds borders between the first four paragraphs in the document.

Dim docActive As Document
Dim rngTemp As Range

Set docActive = ActiveDocument
Set rngTemp
=
docActive.Range( _
    Start:=docActive.Paragraphs(1).Range.Start, _
    End:=docActive.Paragraphs(4).Range.End)

With rngTemp.Borders
    .InsideLineStyle = wdLineStyleSingle
    .InsideLineWidth = wdLineWidth150pt
End With