Re: Word Numbering Macro

Subject: Re: Word Numbering Macro
From: Graham Tillotson <graham -at- MEGSINET -dot- NET>
Date: Wed, 27 Jan 1999 19:56:10 -0600


This thread is ancient, I know, but here's my favorite solution. Since I
work primarily in RoboHELP, I create a style called "Step" in RoboHELP.dot
that has a simple hanging indent. I enter my numbers manually, then as
needed I run a quick macro to bold the numbers and apply a character style
("Step Number") and bold the numbers. For it to work, you have to have the
styles "Step" and "Step Number" in your template, your numbers must be
followed by a tab and then text, and you can't have over 50 steps. The macro
can be adjusted to modify these limitations. If you lose your conditional
formatting on the numbers, no problem--just rerun the macro.

Sub Bold_Numbers()
On Error GoTo bold_numbers_err
counter = 1
Do Until counter = 51
Selection.Find.clearformatting
Selection.Find.Style = ActiveDocument.styles("Step")
Selection.Find.Replacement.clearformatting
Selection.Find.Replacement.Style = ActiveDocument.styles("Step Number")
With Selection.Find
.Text = counter & "^t"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue

End With
Selection.Find.Execute Replace:=wdReplaceAll
counter = counter + 1
Loop
bold_numbers_exit:
Exit Sub
bold_numbers_err:
MsgBox Err.Description
Resume bold_numbers_exit
End Sub

<<attachment: winmail.dat>>


Previous by Author: Re: Acceptance of US writing by Canadians - different perspective
Next by Author: Bug Tracking Software for techwhirlers
Previous by Thread: Re: How to Make a Powerpoint Manual?
Next by Thread: Inquiry into the nature of technical writing


What this post helpful? Share it with friends and colleagues:


Sponsored Ads