Numbered List VBA script not working in Word 2004 for Mac

D

drlelong

Hi,

The below script works fine in Word 2003 for PC by properly finding
each line in a numbered list and inserting a character. However, it
does not appear to find the numbered lists in Word 2004 for Mac. I
have a second script that works fine for bulleted lists (posted below
the first script). Any thoughts?

Thanks,

David

---

Private Sub ConvertNumberLists(ByRef wikiDoc As Document)

Dim listItem As Paragraph

' Loop through all the lists in the doc
For Each listItem In wikiDoc.ListParagraphs
' Look for numbered lists
If listItem.Range.ListFormat.ListType = wdListSimpleNumbering
Then
listItem.Range.InsertBefore FC_LIST_NUMBER_BEGIN
listItem.Range.InsertAfter FC_LIST_NUMBER_END
listItem.Range.ListFormat.RemoveNumbers
End If
Next listItem

End Sub

---

Private Sub ConvertBulletLists(ByRef wikiDoc As Document)

Dim listItem As Paragraph

' Loop through all the lists in the doc
For Each listItem In wikiDoc.ListParagraphs
' Look for bullet lists
If listItem.Range.ListFormat.ListType = wdListBullet Then
listItem.Range.InsertBefore FC_LIST_BULLET_BEGIN
listItem.Range.InsertAfter FC_LIST_BULLET_END
listItem.Range.ListFormat.RemoveNumbers
End If
Next listItem

End Sub
 
J

JE McGimpsey

The below script works fine in Word 2003 for PC by properly finding
each line in a numbered list and inserting a character. However, it
does not appear to find the numbered lists in Word 2004 for Mac. I
have a second script that works fine for bulleted lists (posted below
the first script). Any thoughts?

Found the lists for me in Word2004 (11.3) with numbered lists generated
with style List Number.
 

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