R
Richard John
Does anyone know how to create a bulleted list using Word 2000 VBA (XP Pro
SP2)? I have tried, but the VBA I've written seems to want to only bullet
every alternate item. The broad format of the document I want is:
- 423 Clients were surveyed
- 251 clients or 59% did not return the survey
- 172 clients or 41% completed the survey
Subheading 1
- 75% considered that a worker was allocated in a reasonable time.
- 90% felt that the plan looked at what they could do
Subheading 2
- Faster response time following request.
- worker is to be highly commended.
What I am getting is every alternate point being bulleted. Like:
=================================================
423 Clients were surveyed
- 251 clients or 59% did not return the survey
172 clients or 41% completed the survey
- Subheading 1 (WRONG)
75% considered that a worker was allocated in a reasonable time.
Here is code the fragment that does this:
===========================
If sClass = "heading" Then 'If it is a heading, then bold
it and insert a paragraph feed
With Selection
.TypeParagraph
.Font.Bold = True
.TypeText Text:=sData
.Font.Bold = False
.TypeParagraph
End With
else 'Otherwise add a bullet
With Selection
.Range.ListFormat.ApplyBulletDefault
.TypeText Text:=sStatement
.TypeParagraph
End With
End If
What's wrong with the code?
Second question: How can I programmatically delete a page I don't want, from
a Word document? Can't find anything that will help me.
Thanks
SP2)? I have tried, but the VBA I've written seems to want to only bullet
every alternate item. The broad format of the document I want is:
- 423 Clients were surveyed
- 251 clients or 59% did not return the survey
- 172 clients or 41% completed the survey
Subheading 1
- 75% considered that a worker was allocated in a reasonable time.
- 90% felt that the plan looked at what they could do
Subheading 2
- Faster response time following request.
- worker is to be highly commended.
What I am getting is every alternate point being bulleted. Like:
=================================================
423 Clients were surveyed
- 251 clients or 59% did not return the survey
172 clients or 41% completed the survey
- Subheading 1 (WRONG)
75% considered that a worker was allocated in a reasonable time.
Here is code the fragment that does this:
===========================
If sClass = "heading" Then 'If it is a heading, then bold
it and insert a paragraph feed
With Selection
.TypeParagraph
.Font.Bold = True
.TypeText Text:=sData
.Font.Bold = False
.TypeParagraph
End With
else 'Otherwise add a bullet
With Selection
.Range.ListFormat.ApplyBulletDefault
.TypeText Text:=sStatement
.TypeParagraph
End With
End If
What's wrong with the code?
Second question: How can I programmatically delete a page I don't want, from
a Word document? Can't find anything that will help me.
Thanks