InsideLineWidth Property

Microsoft Word Visual Basic

Show All

InsideLineWidth Property

       

Returns or sets the line width of the inside border of an object. Returns wdUndefined if the object has inside borders with more than one line width; otherwise, returns False or a WdLineWidth constant. Can be set to True, False, or one of the following WdLineWidth constants.

WdLineWidth can be one of these WdLineWidth constants.
wdLineWidth025pt
wdLineWidth050pt
wdLineWidth075pt
wdLineWidth100pt
wdLineWidth150pt
wdLineWidth225pt
wdLineWidth300pt
wdLineWidth450pt
wdLineWidth600pt

expression.InsideLineWidth

expression   Required. An expression that returns a Border object.

Example

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

Dim tableTemp As Table

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

This example adds dotted borders between the first four paragraphs of the active 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)

rngTemp.Borders.InsideLineStyle = wdLineStyleDot
rngTemp.Borders.InsideLineWidth = wdLineWidth075pt