ListType Property doesn't work with Word 2000 
Author Message
 ListType Property doesn't work with Word 2000

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



Tue, 01 Jun 2004 21:51:11 GMT  
 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



Sun, 18 Jul 2004 17:17:55 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. VB hooks to WORD don't seem to work with Word 2000 SP1

2. Win 2000 Offline files doesn't work with mdb

3. CreatQueryDef In Access 2000 Doesn't Work?

4. ADO Help doesn't work from within Access 2000

5. OpenDatabase doesn't work in Access 2000

6. An access 95 program doesn't work on access 2000

7. Why doesn't this code work on win 2000

8. Code doesn't work on windows 2000

9. Gettype for Windows 2000 doesn't work?

10. GetOpenFileName32 doesn't work under Win 2000

11. How ironic, the HPC 2000 SDK Download page doesn't work

12. Macro doesn't run under Word 2000

 

 
Powered by phpBB® Forum Software