Article ID: 181969
Article Last Modified on 11/23/2006
APPLIES TO
- Microsoft Word 98 for Macintosh
This article was previously published under Q181969
SYMPTOMS
When you attempt to apply a single side border to a single character, word
or selection of text either by choosing Borders And Shading (on the Format
menu) or by using the Visual Basic for Applications Borders property, all
borders are applied (top, bottom, left, and right).
CAUSE
By design, all borders are applied (top, bottom, left and right) to a
single character, word or selection of text.
For example, the following sample Visual Basic for Applications macro
places a border around the second word in the document although the
command explicitly states to format the word with a top border only:
Sub BorderWord()
Documents.Add
Selection.InsertBefore "One two three"
ActiveDocument.Words(2).Borders(wdBorderTop).LineStyle = 7
End Sub
The Word Help Topic "Add a Border" incorrectly states that you can add
a border to any or all sides of selected text.
REFERENCES
For more information about getting help with Visual Basic for Applications,
please see the following article in the Microsoft Knowledge Base:
163435
VBA: Programming Resources for Visual Basic for
Applications
Additional query words: vb vba vbe
Keywords: kbmacroexample kbprb KB181969