Article ID: 184633
Article Last Modified on 6/17/2005
Sub BorderCell()
' Set the border style and width.
With Options
' Set the line style.
.DefaultBorderLineStyle = wdLineStyleThinThickLargeGap
' Set the line thickness.
.DefaultBorderLineWidth = wdLineWidth150pt
End With
' Select and apply border to table cell.
With Selection
' Select only the cell containing the insertion point.
.GoTo what:=wdGoToBookmark, Name:="\cell"
' Apply border to cell.
.Cells.Borders.Enable = True
.Collapse
End With
End Sub
For more information about the DefaultBorderlineStyle property, from the
Visual Basic Editor, click the Office Assistant, type
defaultborderlinestyle click Search, and then click to view
"DefaultBorderlineStyle Property."
176476 OFF: Office Assistant Not Answering Visual Basic Questions
181058 OFF98: How to Run Sample Code from Knowledge Base Articles
163435 VBA: Programming Resources for Visual Basic for Applications
Additional query words: wordcon vb vba vbe
Keywords: kbhowto kbmacroexample kbdtacode KB184633