Archives for January 12, 2012

Word of Law No. 4 – Word Automatic Numbering

[Originally appeared 1999.]

We continue the saga of automatic numbering. Many of you have written about familiar and not so familiar issues with automatic numbering. We hope to answer many of the questions, but we are not ready for a Q&A column just yet.

First, I strongly encourage reference to resources that have attacked paragraph numbering and related issues. Several Microsoft Word newsgroups have had active discussions, including microsoft.public.word.numbering, microsoft.public.word.applicationerrors and microsoft.public.word.formatting.longdocs groups.

Microsystems Engineering has presented several terrific documents on numbering and other aspects of excellent use of Word, as well as conversion from WordPerfect, at http://www.microsystems.com/resources/word-tips-and-tricks.php. “The Seven Laws of Word’s Outline Numbering” have been an inspiration, including the title for the first of these columns. Sherry Kappel at Microsystems recommends “Learning Word Programming” by Steven Roman, O’Reilly & Associates; ISBN: 1-56592-524-6, especially for its coverage in Chapter 17 of the List object (and its cousins, the ListTemplates Object and ListGalleries Object) the powers for good and evil behind the scenes of Word 97’s numbering feature.There is much to absorb from these sources, and this column won’t attempt to reproduce all of it.

The last column’s explored the tab settings that reappear when changing numbering formats (whimsically entitled “Jason tabs” in the Microsystems article for their refusal to die). At the end, we mentioned the use of List Gallery settings to avoid shifts of left indents and first line indents when changing paragraph numbering formats. For instance, a document may contain a numbering format scheme attached to a series of heading styles, and the left indents and first line indents are supposed to be different from those in the default settings for the paragraph numbering scheme. If the changes are made by changing the formatting settings of the styles, a change of numbering formats using the List Gallery will undo these custom settings. If the changes are made through the List Gallery, however, the custom settings will stick.

The settings to use are found in the “Customize Outline Numbered List” dialog that appears when one of the numbering format sets is selected and the “Customize” button is executed on the Bullets and Numbering dialog. The Customize dialog includes settings for “Number Position” and “Text Position.” The Number Position sets a first line indent for the paragraph (and linked style) and the Text Position sets the left indent for the paragraph (and linked style). To the uninitiated, these settings look like modifications of the linked style. They show up as Paragraph Style settings in Help|What’s This. They also get reported as properties of the appropriate style under VBA. Yet (and it’s a big yet) they behave specially (a euphemism) when interacting with the List Gallery.

As an antidote to negativity and complexity, here is a very effective and powerful keystroke shortcut to use when working with numbering linked to styles. By default, the “Promote” and “Demote” numbering level functions are assigned to ALT SHIFT LEFT ARROW and ALT SHIFT RIGHT ARROW, respectively. These keystrokes raise or lower the numbering level of the currently selected text, and, if styles are linked, change to the appropriate linked style. If the text is not in a numbering level (such as text in a Body Text Style), the level will be promoted to Level 1. The keystrokes perform the same function as the promote and demote buttons on the Outlining toolbar. For folks converting from WordPerfect, their function achieves similar or greater power than the [Par Num:Auto] code did.

Will Word 2000 save the day? How did Word’s automatic numbering get like this anyway? The answer to the first question is easy, the second mysterious. No, there have been no changes in the functionality of automatic numbering in Word 2000. Answering the second question is difficult because there is so little documentation from Microsoft, and no one I have spoken to can identify the persons responsible for the present system.

As best one can reconstruct, versions of Word prior to Word 97 could apply numbering directly to paragraphs, without linkage to styles, or could link numbering to Heading styles. There were limits on the variations of number format that did not meet the expectations for legal documents and other complex numbering formats, especially those that have combined levels, such as Section 1.1.1 (or its cousins Chapter I followed by a second level such as 1.1).

There was (and still is) a second approach to creating numbering sequences using {SEQ} fields. One way to see these fields is to convert a WordPerfect document with a full set of numbering levels. The WordPerfect automatic numbering will be converted to those fields. Some who have struggled with AutoNumbering have concluded that {SEQ} fields are the only safe alternative. We will explore the advantages and disadvantages of both approaches in later columns.

Word 97’s design included the direction to provide significantly greater numbering flexibility. The enhancements included the ability to link numbering formats to any style and to use a mix of direct number formatting and style linked formatting. Number formats could include prior levels, without inheriting the text prefixes and suffixes of the prior levels. These capabilities were added to the Bullets and Numbering dialog, which retained its basic look and feel from the prior versions. It looks like this project was never finished, and we are left with a very mixed environment.

One imagines that the programmers were assigned to the key projects for Word 2000, such as the HTML round trip. After all, paragraph numbering is not an Internet issue. From the comments of some of the Microsoft staff, we would do best if we could describe it as one. Let’s consider ourselves challenged.

This 1999 article originally appeared in Office Watch.  Subscribe to Office Watch free at http://www.office-watch.com/.

Word of Law No. 1 – The Seven Laws of Styles

[Originally appeared 1999]

THE SEVEN LAWS OF STYLES

LAW 1. All paragraph formatting should be applied through appropriate paragraph styles. Use the least possible direct formatting. Do not use the Format Painter.

The documents of legal practice should be highly consistent in formatting and structure. Sometimes they must follow prescribed formatting rules, such as those of courts. Legal documents get reworked intensely and reused constantly. Documents need to be reformatted in whole, whether to meet the requirements of different courts, or the practices of different departments. Portions of documents should be able to be moved and reused, with a minimum of reformatting.

Thorough use of styles, backed by appropriate templates, enables Word to work just this way. Direct formatting may seem to be a quick solution to special formatting needs, but it makes it difficult to “see” the source of formatting and to allow clean reformatting when a document needs to travel. The Format Painter is even worse, creating invisible formatting links that ought to be controlled by proper application of styles.

Note that this discussion applies to paragraph styles. Character styles have much less use. They will be covered in a future column.

LAW 2. Format Follows Function.

With a nod of the head to our architect friends, this law tells us to name styles for the function text performs in a document, rather than the method of formatting. For instance, the most common text in many documents will use Body Text style. If in some documents it needs to be single spaced, while in others double spaced, don’t use a “Single Space” style for one and a “Double Spaced Style” for the other. Use Body Text in both, but change the settings for Body Text (preferably through application of a grouped set of styles maintained in a template). Then the document will be instantly and accurately transformed from the formats required by one practice to those of another, with no fiddling around with formatting.

LAW 3. Use common names for styles across the body of legal documents.

Use Body Text as the style for the body text of all documents, Headings 1 through 9 as the style names for heading levels, and so on. Then, to change the overall formatting of documents, store the appropriate style settings in a template, and use the Style Gallery to switch formats.

LAW 4 Avoid applying Normal style.

Use Normal style as a base for other styles. Using Normal Style itself violates LAW 2.

LAW 5 Change locally, then propagate globally, but do not use the “Automatically Update” setting for any styles.

The Automatically Update setting can cause nearly instantaneous havoc with document formatting. It represents a solution to an intrinsic issue in ease of use for Word. While styles have all the power we have described, modifying and managing them can be difficult to learn, and often, even for experienced users, difficult to do. To modify styles, users must dig through 5 levels of menus and dialogs, then climb back again. When you get there, the connection between the settings and text may be very difficult to see.

Automatically Update was supposed to solve that. For instance, changing Left and Right Indents or tab settings could be accomplished directly and visually with the controls on the Ruler. Then, with Automatically Update on, these changes would immediately change the style settings the same way. Unfortunately this can also happen accidentally, leaving users confused and frustrated.

Word has a better, more controllable way to spread local formatting changes to the style applied to a paragraph. Make the font, spacing and indent changes to one paragraph of the appropriate style. Then, select the paragraph including its paragraph mark. With the formatting toolbar on, press CTRL SHIFT S (or mouse click on the style name in the toolbar) and press ENTER. If (and only if) you have changed the formatting of the paragraph from that of its style, a “Modify Style” dialog will appear asking whether “you wish to modify the style to reflect recent changes” or reapply the formatting of the style to the paragraph. Choosing the first will then propagate the local changes to the style and change all paragraphs in the document with that style.

Catch 1. This technique does not work unless a toolbar is showing with the style name (standard in the default Formatting toolbar).

Catch 2. Spacing and indent changes can propagate using this technique whether or not the paragraph mark for the paragraph has been selected. Font changes for the paragraph as a whole can propagate only if the paragraph mark has been selected. If not, this technique will cause the font to revert to that of the style. Thus, learning the technique by selecting the whole paragraph, including its paragraph mark, achieves more consistent results.

Catch 3. This technique can leave hidden direct formatting. In a future column, we will look at a macro shortcut that will support these technique without the catches.

The following macro will remove the Automatically Update setting from all styles in a document for Word 97 and 2000.

Public Sub RemoveAutomaticallyUpdate() Dim aSty As Style For Each aSty In ActiveDocument.Styles aSty.AutomaticallyUpdate = False Next aSty End Sub

LAW 6 Use no empty paragraphs.

Empty paragraphs are a relic of typing. They have no text except the paragraph mark. When documents use them for spacing, instead of styles set with proper paragraph spacing, they corrupt the clean global transformation of document formats.

Again, a brief macro can clean out empty paragraphs.

Public Sub CleanEmptyParagraphs() Dim aPara As Paragraph For Each aPara In ActiveDocument.Paragraphs If Asc(aPara.Range.Characters.First) = 13 Then aPara.Range.Delete End If Next aPara End Sub

LAW 7 Tie automatic numbering to heading styles.

This law deserves its own column, next time.

 

This 1999 article originally appeared in Office Watch.  Subscribe to Office Watch free at http://www.office-watch.com/

Word of Law – Introduction

[Originally appeared 1999]

At the end of a few weeks of participation in the beta testing of Woody