I try to insert a bulleted list in a MS Word (2000) document from VBA Excel. I have already created the document through the VBA-code. The major problem seems to be that VBA doesn't find the ListGallery wdBulletGallery.
Anyone who has any ideas how to solve this problem?
Set WordApp = CreateObject("Word.Application")
With WordApp
.ListGalleries(wdBulletGallery).ListTemplates(1).Name = ""
.Selection.Range.listformat.applylisttemplate listtemplate:=.ListGalleries(wdBulletGallery).ListTemplates(1), continuepreviouslist:=False, applyto:=wdlistapplytowholelist, defaultlistbehavior:=wdword9listbehavior
.Selection.typetext Text:="Text1"
.Selection.typeparagraph
.Selection.typetext Text:="Text2"
.Selection.typeparagraph
.Selection.typetext Text:="Text3"
.Selection.typeparagraph
End With
Kindly regards
Martin