N
Neale
Hi All,
I am trying to export data from a database into a particular section of a
Word document. No problems creating a simple list using the code below, but
I need to create a list with sub-items as a multi-level list.
The following is the code I wrote to create a simple single level list. The
GetExportItems() function returns a single level list, which is then applied
to the range.Text and saved back to the document as a new bookmark.
Set wdRange = wdApp.ActiveDocument.bookmarks("Requirements").Range
strNewText = GetExportItems()
' Update the range with the replacement text and apply bullet style to
the list
wdRange.Text = strNewText
If Forms("Entry-ExportOptions").Form.FrameExportOptions = 1 Then
' Export the data in bullet list format
wdRange.Style = wdStyleListBullet3
Else
' Export the data in number list format
wdRange.Style = wdStyleListNumber3
End If
Can anybody help or suggest how I can achieve this. I have considered
creating two ranges, one with a list at a particular level and the next with
a further indented list (containing the child items), and then append the
ranges together - but I have not had any success with this approach.
Thanks for any help.
I am trying to export data from a database into a particular section of a
Word document. No problems creating a simple list using the code below, but
I need to create a list with sub-items as a multi-level list.
The following is the code I wrote to create a simple single level list. The
GetExportItems() function returns a single level list, which is then applied
to the range.Text and saved back to the document as a new bookmark.
Set wdRange = wdApp.ActiveDocument.bookmarks("Requirements").Range
strNewText = GetExportItems()
' Update the range with the replacement text and apply bullet style to
the list
wdRange.Text = strNewText
If Forms("Entry-ExportOptions").Form.FrameExportOptions = 1 Then
' Export the data in bullet list format
wdRange.Style = wdStyleListBullet3
Else
' Export the data in number list format
wdRange.Style = wdStyleListNumber3
End If
Can anybody help or suggest how I can achieve this. I have considered
creating two ranges, one with a list at a particular level and the next with
a further indented list (containing the child items), and then append the
ranges together - but I have not had any success with this approach.
Thanks for any help.