Home | Tips | Library | Other Authors | Other WP Sites | Writer's Links | Contact | Site Map | Donate

Barry MacDonnell's
Toolbox for WordPerfect

Macros, tips, and templates for Corel® WordPerfect® for Windows®
© Copyright 1996-2018 by Barry MacDonnell. All Rights Reserved.

Page updated May 28, 2018

Capitalize the first letter in a sentence (but without changing the case of other words)

Download CAPFIRST.ZIP (v1.0; 05/27/18; 7,644 bytes)

Written in WordPerfect X9 but should be compatible with other versions

WordPerfect 11 users: See important information about using macros in the first release of WP11 (11.0.0.233) at the top of this page.

Downloading, Documentation, Modifications, and Support



Related pages -

•  Convert Case - a macro  to convert the case of text (6 options, including Reverse case)

•  RLCaps - A macro that finds every capital (uppercase) letter, then emphasizes it with redline. It can optionally add large size, bold, and/or italics, Like This. Changes are easily undone.

This makes capital letters easy to find when proofreading the document. (See the footnote on that page to add a new font to upper case letters.)

Capitalize first letter in a sentence.wcm is a macro that converts just the first letter in a sentence to UPPER case if it's not already in upper case.

This can be useful when editing text that might have split sentences, perhaps due to cut/copy/paste or similar operations where the first word in the sentence is left in lower case. Also, many table cells are candidates for initial capital letters.

As an example, if a sentence begins with a lower-case word like this -

   "john will be attending the class," Mary said.

Then placing your cursor on (or to the left of) the word (or selecting the sentence) will instantly change it to -

   "John will be attending the class," Mary said.

WordPerfect's Edit menu has a choice that can convert several types of UPPER and lower case text (see also the similar Convert Case macro in the Library for a version with additional features).

But WordPerfect's "Sentence case" (new with WordPerfect X9) converts all other upper case letters -- such as the "M" in "Mary" in the above examples -- to lower case, while converting the first letter in the sentence to upper case.

On the other hand this macro retains all upper case letters since it simply finds the first letter in the sentence and
if it is currently in lower case it converts it to upper case.

Tips

☼  "Step" through the text: If you play the macro sequentially multiple times, it will (by default) move step-wise through subsequent sentences (one sentence at a time) and convert their initial letters if needed. You can edit the macro and make a simple change to remove this feature. See the redlined vMoveCursor variable at the beginning of the macro code and change its "1" to a "0".

☼ 
By default the macro very briefly blinks (and beeps) at the conversion location using a pair of WordPerfect square symbols which are then immediately deleted. You can edit the macro and make a simple change to remove this feature. See the redlined vMakeBlink variable at the beginning of the macro code and change its "1" to a "0".  [Symbols were used rather than (e.g.) briefly adding formatting to the converted text so that any style present would not be inadvertently changed.]

☼  The macro might be more conveniently used by assigning it to a toolbar button, keyboard shortcut, or menu item. (See here for help.) That way you can simply and quickly step your way through a section of the document that might have several un-capitalized words that begin sentences.