General information
Category:
COM/DCOM and OLE Automation
Title:
Word Automation - List within a list
I am processing a file of itms and forming a list using Word Automation. I have included the code below just in case it is needed in order to understand my question. The concept is fairly simple but the implementation seems to elude me.
My code, thus far, will save the position of the range where I wish to have my list begin and then after I have finished inserting each of the list elements, I create the main list. The problem is that one of the list items is also a list and when I attempt to create the final list, that mini-list within the list gets reformatted into the main list.
I would appreciate any insight into this from those with more experience than me. Thanks.
nRangeStart = oRange.Start
GO top
DO WHILE NOT EOF()
IF NOT EMPTY(list_item) && Which may contain a list within it.
oRange.InsertAfter(list_item)
ENDIF
SKIP
ENDDO
oRange.Start = nRangeStart
oRange.ListFormat.ApplyListTemplate(oWord.ListGalleries[1].ListTemplates[1], .f.)
oRange.ParagraphFormat.LeftIndent = nBaseLeftIndent + nOneInch * .50
oRange.ParagraphFormat.FirstLineIndent = nOneInch * -.25
oRange.collapse(wdCollapseEnd)
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only