Borders.InsideLineStyle property (Word)
Returns or sets the inside border for the specified object. .
Syntax
expression. InsideLineStyle
expression Required. A variable that represents a 'Borders' collection.
Remarks
This property returns wdUndefined if more than one kind of border is applied to the specified object; otherwise, returns False or a WdLineStyle constant. Can be set to True, False, or a WdLineStyle constant.
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
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.