help with WordBasic.FormatMultilevel

  • Thread starter charlie.planetxsolutions
  • Start date
C

charlie.planetxsolutions

hi there,

i have a piece of wordbasic that i need to convert to vba! any clues that
you can provide would be most appreciated!

here is the code following the selection. i'm particularily stumped as to
what the last WordBasic.FormatMultilevel line in the if statement does?

' Set up a multi-leveling numbering system using the start number
' and prefix string (article number) for first level (left
' justified) clauses only

' ** Level 1 uses numbers x.x
WordBasic.FormatMultilevel Points:="Auto", Color:=0,
Before:=sArticleNumber$, Type:=0, After:="", StartAt:=sTagNumberInteger$,
Include:=0, Alignment:=0, Indent:="0.5" + Chr(34), Space:="0" + Chr(34),
Hang:=1, Level:="1", Font:="", StrikeThrough:=-1, Bold:=-1, Italic:=-1,
Underline:=-1

' ** Level 2 uses letters (a)
WordBasic.FormatMultilevel Points:="Auto", Color:=0, Before:="(", Type:=4,
After:=")", StartAt:=sStart_Letter$, Include:=0, Alignment:=0, Indent:="0.5"
+ Chr(34), Space:="0" + Chr(34), Hang:=1, Level:="2", Font:="",
StrikeThrough:=-1, Bold:=-1, Italic:=-1, Underline:=-1

' ** Level 3 uses Roman numerals (i)
WordBasic.FormatMultilevel Points:="Auto", Color:=0, Before:="(", Type:=2,
After:=")", StartAt:="1", Include:=0, Alignment:=0, Indent:="0.5" + Chr(34),
Space:="0" + Chr(34), Hang:=1, Level:="3", Font:="", StrikeThrough:=-1,
Bold:=-1, Italic:=-1, Underline:=-1

' Level 4 uses capital letters
WordBasic.FormatMultilevel Points:="Auto", Color:=0, Before:="", Type:=3,
After:=".", StartAt:="1", Include:=0, Alignment:=0, Indent:="0.5" + Chr(34),
Space:="0" + Chr(34), Hang:=1, Level:="4", Font:="", StrikeThrough:=-1,
Bold:=-1, Italic:=-1, Underline:=-1

WordBasic.FormatMultilevel Points:="Auto", Color:=0, Before:="(", Type:=0,
After:=")", StartAt:="1", Include:=0, Alignment:=0, Indent:="0.5" + Chr(34),
Space:="0" + Chr(34), Hang:=1, Level:="5", Font:="", StrikeThrough:=-1,
Bold:=-1, Italic:=-1, Underline:=-1
WordBasic.FormatMultilevel Points:="Auto", Color:=0, Before:="(", Type:=4,
After:=")", StartAt:="1", Include:=0, Alignment:=0, Indent:="0.5" + Chr(34),
Space:="0" + Chr(34), Hang:=1, Level:="6", Font:="", StrikeThrough:=-1,
Bold:=-1, Italic:=-1, Underline:=-1
WordBasic.FormatMultilevel Points:="Auto", Color:=0, Before:="(", Type:=2,
After:=")", StartAt:="1", Include:=0, Alignment:=0, Indent:="0.5" + Chr(34),
Space:="0" + Chr(34), Hang:=1, Level:="7", Font:="", StrikeThrough:=-1,
Bold:=-1, Italic:=-1, Underline:=-1
WordBasic.FormatMultilevel Points:="Auto", Color:=0, Before:="(", Type:=4,
After:=")", StartAt:="1", Include:=0, Alignment:=0, Indent:="0.5" + Chr(34),
Space:="0" + Chr(34), Hang:=1, Level:="8", Font:="", StrikeThrough:=-1,
Bold:=-1, Italic:=-1, Underline:=-1
WordBasic.FormatMultilevel Points:="Auto", Color:=0, Before:="(", Type:=2,
After:=")", StartAt:="1", Include:=0, Alignment:=0, Indent:="0.5" + Chr(34),
Space:="0" + Chr(34), Hang:=1, Level:="9", Font:="", StrikeThrough:=-1,
Bold:=-1, Italic:=-1, Underline:=-1

' Display the level numbers only if there is some selected text
' and the text is not the line that contains <section_?> tag
If InStr(Selection.Text, sSectionStartTag$) = 0 Then
WordBasic.FormatMultilevel
End If
 
J

Jay Freedman

Hi Charlie,

Here's the FormatMultiLevel topic from the Word 95 WordBasic help
file. The second paragraph of the .Level explanation tells us that
none of the calls actually apply their formats, while the last call
has no arguments and applies all the others (essentially, hitting OK
in the dialog box).

FormatMultilevel [.Points = number] [, .Color = number] [, .Before =
text] [, .Type = number] [, .After = text] [, .StartAt = number] [,
..Include = number] [, .Alignment = number] [, .Indent = number or
text] [, .Space = number or text] [, .Hang = number] [, .Level =
number] [, .Font = text] [, .Strikethrough = number] [, .Bold =
number] [, .Italic = number] [, .Underline = number]

Applies multilevel list numbers to the selected paragraphs or changes
numbering options for a specified level. The arguments for the
FormatMultilevel statement correspond to the options in the Modify
Multilevel List dialog box (Multilevel tab, Bullets And Numbering
command, Format menu). You cannot display this dialog box using a
Dialog or Dialog() instruction.

Argument Explanation
..Level A number from 1 through 9 corresponding to the heading
level whose numbering options you want to change.

Note that if you specify .Level, the options you
set in the FormatMultilevel instruction are not
applied. To apply the settings, include a second
FormatMultilevel instruction in which .Level is not
specified.
..Points, .Color, .Font, .Strikethrough, .Bold, .Italic, .Underline
Apply character formatting to numbers at the specified
level. For individual argument descriptions, see
FormatFont.
..Before, .After, .Alignment, .Indent, .Space, .Hang
Set options for numbers at the specified level. For
argument descriptions, see FormatNumber.
..Type Specifies a format for numbering headings at the
specified level:
0 (zero) 1, 2, 3, 4
1 I, II, III, IV
2 i, ii, iii, iv
3 A, B, C, D
4 a, b, c, d
5 1st, 2nd, ...
6 One, Two, ...
7 First, Second, ...
..StartAt The number for the first heading in each sequence of
headings of the specified level. If .Type is 3 or
4, .StartAt corresponds to the position in the
alphabet of the starting letter.
..Include Specifies whether to include numbers and position
options from the previous headings for numbers at
the specified level:
0 (zero) Includes neither numbers nor position
options.
1 Includes a series of numbers from higher-level
headings before the numbers at the specified
level.
2 Includes both numbers from higher
level-headings and position options from the
previous level.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top