Lets you easily turn selected paragraphs into numbered steps, such as you
find in manuals. If you add or delete steps later during editing, you must
reselect all the paragraphs (including the ones already numbered) and run
the macro again to renumber the steps properly. An obvious limitation of
this macro is that one paragraph = one step. You cannot have multiple
paragraphs within a step. If no paragraphs are selected when you run this
macro, an alert will tell you to select one or more paragraphs first.
Although you can use outline numbering to accomplish the same thing,
WordPerfect's outline numbering does not convert when you you save in
other formats. This approach to paragraph numbering does.
Display (Off)
If (SelectionFlag)
Copy
New Document
Paste
Home ()
Assign (Var01;0)
Repeat
Find/Change Direction (Forward;No Wrap)
Find/Change Where ({All})
Find/Change Match (Partial Word;Case Insensitive;Alphabet
Insensitive;CharRep Insensitive;{Text Only})
Find/Change Affect (Affect Case;{Text Only})
Find/Change Action (Select Match)
Find String ("[Hard Return]")
Change String ("[Hard Return]")
Find
Change
Assign (Var01;Var01+1)
Until (FindStatusFlag=0)
Home ()
Find/Change Direction (Forward;No Wrap)
Find/Change Where ({All})
Find/Change Match (Whole Word;Case Insensitive;Alphabet
Insensitive;CharRep Insensitive;{Text Only})
Find/Change Affect (Affect Case;{Text Only})
Find/Change Action (Select Match)
Find String ("[Language:English (USA)][Font:Geneva][Size:12][Match
1][Tab]")
Change String ("")
Change All
Home ()
Find/Change Direction (Forward;No Wrap)
Find/Change Where ({All})
Find/Change Match (Partial Word;Case Insensitive;Alphabet
Insensitive;CharRep Insensitive;{Text Only})
Find/Change Action (Select Match)
Find String ("[Language:English (USA)][Font:Geneva][Size:12][Match
n][Tab]")
Change All
Home ()
Assign (Var02;1)
Type Var (Var02)
Tab
Select Paragraph
Down ()
While (Var02<Var01-1)
Assign (Var02;Var02+1)
Type Var (Var02)
Tab
Select Paragraph
Down ()
End While
Select All
Copy
Close
Paste
Else
Alert ("Please select one or more paragraphs first.")
End If
End Macro
Gregory Wasson Contributing Editor, MacUser
fpc...@aol.com
I have some WordPerfect 3.x files which use automatic paragraph numbers.
Has anyone a macro or other method to convert the automatic numbers to
ordinary text numbers? Incidentally, not every paragraph is numbered.
TIA,
/jonathan
Here!s my macro for it:
On Error (end)*
Get Integer (Var01;1;32767;"First Paragraph Number";"Enter number for
first paragraph")*
Home ()*
Repeat*
Find Next Code (Forward;Paragraph Number)*
Abort When Not Found*
Delete*
Type Var (Var01)*
Type (.)*
Assign (Var01;Var01+1)*
Until (FindStatusFlag=0)*
Label (end)*
and here!s Dave & Daniel!s (of WP) macro for it:
Display (Off)*
; If text is selected, isolate it in a new document*
If (SelectionFlag)*
Copy*
New Document*
Paste*
Assign (Var00;1)*
End If*
; Start the conversion from the bottom*
End ()*
Label (top)*
; Find the next auto paragraph number*
Find Next Code (Backward;Paragraph Number)*
; If there isn't one, we're done*
If (!FindStatusFlag)*
Go (done)*
End If*
; Cut the number and paste it as text so that the hard number is inserted*
Left (Select)*
Cut*
Paste Text*
Go (top)*
Label (done)*
; If this was done on selected text, return it to the document*
If (Var00)*
Select All*
Copy*
Close*
Paste*
End If*
End Macro*
One of these should work fine for you. Not every paragraph needs to be
numbered.
To post these, I added an asterisk where every hard return should be.
Since posting adds returns, take these scripts, paste them in a WP doc,
delete all hard returns, then change asterisks to hard returns.
John R.