Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

NumberBullets

2 posts in Objects Last posting was on 2003-02-18 21:39:25.0Z
Lloyd_Dzinotyiwei Posted on 2003-02-17 21:11:18.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: Lloyd_Dzinotyiwei
Date: Mon, 17 Feb 2003 16:11:18 -0500
Subject: NumberBullets
Lines: 62
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Message-ID: <364_407AFCDBC062CD36007463F385256CD0.0074642A85256CD0@webforums>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub sybase.public.powerbuilder.objects:175
Article PK: 712745

I have Powerbuilder 8.0 and I'm writing to a word document in my
application. The document already has some numbered bullets and there are
some instance when I need to remove the numbered bullets and then activate
the numbered bullets, continuing from the previous list.
When I ran a macro in Word to turn the numbered bullets on and see how I
can code it came up with the following.

With ListGalleries(wdNumberGallery).ListTemplates(5).ListLevels(1)
.NumberFormat = "%1."
.TrailingCharacter = wdTrailingTab
.NumberStyle = wdListNumberStyleArabic
.NumberPosition = InchesToPoints(0.25)
.Alignment = wdListLevelAlignLeft
.TextPosition = InchesToPoints(0.5)
.TabPosition = InchesToPoints(0.5)
.ResetOnHigher = 0
.StartAt = 1
With .Font
.Bold = wdUndefined
.Italic = wdUndefined
.StrikeThrough = wdUndefined
.Subscript = wdUndefined
.Superscript = wdUndefined
.Shadow = wdUndefined
.Outline = wdUndefined
.Emboss = wdUndefined
.Engrave = wdUndefined
.AllCaps = wdUndefined
.Hidden = wdUndefined
.Underline = wdUndefined
.Color = wdUndefined
.Size = wdUndefined
.Animation = wdUndefined
.DoubleStrikeThrough = wdUndefined
.Name = ""
End With
.LinkedStyle = ""
End With
Word.ListGalleries(wdNumberGallery).ListTemplates(5).ListLevels(1).NumberFormat
= "%1."

ListGalleries(wdNumberGallery).ListTemplates(5).Name = ""
Selection.Range.ListFormat.ApplyListTemplate
ListTemplate:=ListGalleries(wdNumberGallery).ListTemplates(5),
ContinuePreviousList:=True,
ApplyTo:= wdListApplyToWholeList, DefaultListBehavior:=wdWord9ListBehavior

I have an OLE object and when I tried to apply the above code as follows:
aole_ratesdoc.Application.Selection.Range.ListFormat.ApplyListTemplate(aole_ratesdoc.Application.ListGalleries(2).ListTemplates(5),TRUE,0,1)

It returned the error: ListGalleries is not a method. I then tried with the
following code
aole_ratesdoc.Application.Selection.Range.ListFormat.ApplyListTemplate(aole_ratesdoc.ListGalleries(2).ListTemplates(5),TRUE,0,1)

This too did not work. All I want is to turn the numbered bullets back on.
Please help

Regards

Lloyd


Bobby Posted on 2003-02-18 21:39:25.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: Bobby
Date: Tue, 18 Feb 2003 16:39:25 -0500
Subject: Re: NumberBullets
Lines: 5
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Message-ID: <364_EC2E9144ED0E10E50076F72285256CD1.0077D56185256CD0@webforums>
References: <364_407AFCDBC062CD36007463F385256CD0.0074642A85256CD0@webforums>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub sybase.public.powerbuilder.objects:176
Article PK: 712746

Try using the ApplyNumberDefault() function as follows
aole_ratesdoc.Application.Selection.Range.ListFormat.
ApplyNumberDefault(1)

Should work