
ListType Property doesn't work with Word 2000
I can't solve the problem, but the following code would be easier to read:
With ActiveDocument.Paragraphs(1).Range.ListFormat
Select Case .ListType
Case wdListBullet
MsgBox "Bullets"
Case wdListSimpleNumbering
MsgBox "Outline"
Case wdListOutlineNumbering
MsgBox "Outline"
'End Case
End Select
End With
I have just discovered my help file are missing and can't be bothered getting the CD but Help | About:
About Microsoft Visual Basic
Microsoft Visual Basic 6.0
Copyright 1987-1999 Microsoft Corp.
Warning: ...
Version 8435 VBA: Retail 6.0.8435 Forms3: 2.01
I have never had anything to do with VB6, can anyone explain?
--
Brian
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
All inbound/outbound communications scanned with Norton AntiVirus 2002
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Quote:
> The ListType property seems to give sporadic results in
> Word 2000. Try the following code:
> If ActiveDocument.Paragraphs(1).Range.ListFormat.ListType
> = wdListBullet Then
> MsgBox "Bullets"
> ElseIf ActiveDocument.Paragraphs
> (1).Range.ListFormat.ListType = wdListSimpleNumbering Then
> MsgBox "Simple"
> ElseIf ActiveDocument.Paragraphs
> (1).Range.ListFormat.ListType = wdListOutlineNumbering Then
> MsgBox "Outline"
> End If
> WITH the following experiment:
> 1. Format > Bullets and Numbering; pick the first gallery
> selection under the Bulleted tab; run code.
> 2. Format > Bullets and Numbering; pick the first gallery
> selection under the Numbered tab; run code.
> (At this point it told me I had outline numbering)
> 3. Format > Bullets and Numbering; pick the first gallery
> selection under the Numbered tab; run code.
> (At this point it told me I had outline numbering)
> Repeat steps 1 through 3 and mix them up. See if it gives
> answers as inconsistently for you as it did me.
> All I want is to find out which Gallery was used to format
> the number (mainly whether it is bullets or numbers or
> none). ListType should work, but it doesn't for me.
> Others have confirmed this in another forum. Is this a
> bug? Is there a work around?
> Thanks!!
> Troy