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
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