Converting Uppercase Words to Another Case in Word 2007

Microsoft Word, Tips & Tricks Add comments

mswordtweak.pngA common Word dilemma is downloading or receiving data where some of the text is in uppercase letters. This often happens with reports from mainframe computers, for exam­ple. If the entire document is uppercase, you select all the text (press Ctrl+A) and then apply the case you want, which is probably Capitalize Each Word (in the Home tab, pull down the Change Case menu and click Capitalize Each Word). You can also press Shift+F3 to cycle through the cases.

If some of the text is uppercase, then the problem becomes much harder. Listing 1 solves the problem with a VBA macro.

A VBA Macro That Converts All Uppercase Text to a Specifed Case
Listing 1 A VBA Macro That Converts All Uppercase Text to a Specifed Case

This macro begins by prompting you for the case to which you want to convert the upper­case words. Figure 1 shows the dialog box that displays. You enter 0 for a lowercase con­version, 2 for Capitalize Each Word, and 4 for sentence case. The macro then runs through every word in the document. Each time it finds an uppercase word, it converts it to the case you specified. The macro shows the progress of the conversion in the status bar, and at the end, it displays the number of words that it converted.

Examples of inline num­bered lists-the bottom paragraphs show the field codes used in the top paragraphs
Figure 1 Examples of inline num­bered lists-the bottom paragraphs show the field codes used in the top paragraphs.

Technorati Tags: , ,

Popularity: 2% [?]

Related Post

  • Converting a Word 2007 Outline into a PowerPoint Presentation
  • Converting Smart Quotes to Straight Quotes in Word 2007
  • Extracting Characters from a String in Excel 2007
  • Converting a Slide into an Image in PowerPoint 2007
  • Generating Account Numbers in Excel 2007
  • Don't Find What You're Looking For? Please Try Here...

    Google
     

    Leave a Reply

    WP Theme & Icons by N.Design Studio
    Entries RSS Comments RSS Add to Technorati Favorites Log in