R
Rhino
I'm gradually getting to the end of my ambitious macro but I've just hit a
problem I can't figure out: how do I end a List?
My macro is writing a simple one-level bulleted list with the following
code:
------------------------------------------------------------------------------------------------------
'Describe the list that should be written
ListGalleries(wdBulletGallery).ListTemplates(1).name = ""
Selection.Range.ListFormat.ApplyListTemplate ListTemplate:=ListGalleries( _
wdBulletGallery).ListTemplates(1), ContinuePreviousList:=False,
ApplyTo:= _
wdListApplyToWholeList, DefaultListBehavior:=wdWord10ListBehavior
'Split the list into an array
experienceString = resumefilevalue
experienceArray = Split(experienceString, ";", -1, vbTextCompare)
sizeExperienceArray = UBound(experienceArray) + 1
Do Until counter = sizeExperienceArray
If (experienceArray(counter) <> "") Then
Selection.TypeText experienceArray(counter)
Selection.TypeParagraph
End If
counter = counter + 1
Loop
------------------------------------------------------------------------------------------------------
The list is written just fine but the problem is that everything that
follows the list in the document has a bullet in front of it as if all of
the subsequent lines are further items in this list.
Apparently, I need to do something to indicate that the list has ended and
that subsequent text in the document is not part of the list. Unfortunately,
after a couple of hours poking around trying to figure out how to end the
list, I haven't found anything that works. I can't find the answer in the
help but that's not too surprising: I'm not sure what I should use for a
search question! I've tried a bunch of things via trial and error but to no
avail.
Can anyone tell me what I need to do to end the list? And for bonus points,
maybe you can tell me how I could have figured this out for myself?
problem I can't figure out: how do I end a List?
My macro is writing a simple one-level bulleted list with the following
code:
------------------------------------------------------------------------------------------------------
'Describe the list that should be written
ListGalleries(wdBulletGallery).ListTemplates(1).name = ""
Selection.Range.ListFormat.ApplyListTemplate ListTemplate:=ListGalleries( _
wdBulletGallery).ListTemplates(1), ContinuePreviousList:=False,
ApplyTo:= _
wdListApplyToWholeList, DefaultListBehavior:=wdWord10ListBehavior
'Split the list into an array
experienceString = resumefilevalue
experienceArray = Split(experienceString, ";", -1, vbTextCompare)
sizeExperienceArray = UBound(experienceArray) + 1
Do Until counter = sizeExperienceArray
If (experienceArray(counter) <> "") Then
Selection.TypeText experienceArray(counter)
Selection.TypeParagraph
End If
counter = counter + 1
Loop
------------------------------------------------------------------------------------------------------
The list is written just fine but the problem is that everything that
follows the list in the document has a bullet in front of it as if all of
the subsequent lines are further items in this list.
Apparently, I need to do something to indicate that the list has ended and
that subsequent text in the document is not part of the list. Unfortunately,
after a couple of hours poking around trying to figure out how to end the
list, I haven't found anything that works. I can't find the answer in the
help but that's not too surprising: I'm not sure what I should use for a
search question! I've tried a bunch of things via trial and error but to no
avail.
Can anyone tell me what I need to do to end the list? And for bonus points,
maybe you can tell me how I could have figured this out for myself?