
Tips.Net > WordTips Home > Formatting > Character Formatting > Adjusting Small Caps Text with WordBasic
Summary: Make your small caps text look its best with this handy WordBasic macro. (This tip works with Microsoft Word 6, and Word 95.)
Small caps are a typographic convention in which no lowercase letters are used. Traditionally, the first letter of the word appears a bit larger than the rest of the letters in a word, even though all letters appear as uppercase. In reality, the first letter of the word is uppercase, and the rest are lowercase; they simply appear as large and small caps when you turn on the small caps attribute. When you use the Small Caps character attribute, Word converts the letters to their proper appearance.
To convert words properly to small caps, you need to go through several steps, as follows:
If you are using small caps text sparingly in a document, then these steps are rather quick and painless. However, if you are using it quite a bit, then repeatedly performing the steps can get tiresome. The following is a WordBasic macro you can use to perform these steps. The macro works on either the text you have already selected, or else it selects the word in which the insertion point is positioned.
Sub MAIN
InSelection = SelType()
If InSelection = 1 Or InSelection = 5 Then
Success = WordLeft(1)
If Success <> 0 Then WordRight(1, 1)
Else
Success = 1
End If
If Success <> 0 Then
ChangeCase 2
FormatCharacter .SmallCaps = 1
Else
Beep
End If
End Sub
This macro first tries to use text that has been selected, then it tries to select the text to the left of the insertion point, and if it cannot, it selects the text to the right. If this is successful, then the ChangeCase statement converts the text so that the initial letters of each word are uppercase. Then, if nothing within the section is formatted as small caps, the small caps attribute is turned on.
Tip #270 applies to Microsoft Word versions: 6 95
Ultimate Library! The most amazing collection ever offered in the history of WordTips places every tip—present and historical—at your fingertips. Check out the WordTips Ten-Year Library.
It doesn't matter if you are a beginner or expert, the WordTips archives are the fastest way to improved productivity. (more information...)
Ask a Word Question
Make a Comment
Beauty Tips
Bugs and Pests Tips
Car Tips
Cleaning Tips
College Tips
Cooking Tips
Excel2007 Tips
ExcelTips
Family Tips
Gardening Tips
Health Tips
Home Tips
Money Tips
Organizing Tips
Pet Tips
Word2007 Tips
WordTips