Extracting Numbering

A

Abhishek

Hi! Everyone
I am able to identify bullets from a textbox but how do i identify the
numbering and the number format being used for the numbering.
I am using office 2003 object
Moreover I would like to know how can i detect the position of the bullet
for each line i mean if there are indented text or sub heading the the
position of that too.
in one of the previous posts
'Shyam'
had written
" As regards to the position of the
bullet, if a paragraph begins with a bullet, the bullet position is
determined by the FirstMargin property, and the position of the first text
character in the paragraph is determined by the LeftMargin property. You can
learn more by reading up the Ruler object associated with the TextFrame
object. "
but i am unable to work on this as though i am able to get the levels and
the consequentfirst margin and leftmargin, but i am unable to get the level
on which the current textrange is
Shape.TextFrame.TextRange.Paragraphs(iSentences,1)

Thanks in advance for all the suggestions


Regards,
Abhishek
 
A

Abhishek

Sorry for the first part of the post

I am able to identify bullets from a textbox but how do i identify the
numbering and the number format being used for the numbering.
I am using office 2003 object

I have got the numbering part but the second part the position of the bullet
is still unknown

Regards, Abhishek
 
S

Steve Rindsberg

Have a go with something along these lines:

Dim x As Long
With ActiveWindow.Selection.ShapeRange(1)
For x = 1 To .TextFrame.Ruler.Levels.Count
Debug.Print .TextFrame.Ruler.Levels(x).FirstMargin ' or .LeftMargin
Next x
For x = 1 To .TextFrame.TextRange.Paragraphs.Count
Debug.Print .TextFrame.TextRange.Paragraphs(x).IndentLevel
Next
End With
 
A

Abhishek

Steve Rindsberg said:
Have a go with something along these lines:

Dim x As Long
With ActiveWindow.Selection.ShapeRange(1)
For x = 1 To .TextFrame.Ruler.Levels.Count
Debug.Print .TextFrame.Ruler.Levels(x).FirstMargin ' or ..LeftMargin
Next x
For x = 1 To .TextFrame.TextRange.Paragraphs.Count
Debug.Print .TextFrame.TextRange.Paragraphs(x).IndentLevel
Next
End With

During my testing the FirstMargin and LeftMargin give me this result

FirstMargin Of 1 0
LastMargin Of 1 13.5
FirstMargin Of 2 36
LastMargin Of 2 49.5
FirstMargin Of 3 72
LastMargin Of 3 72
FirstMargin Of 4 108
LastMargin Of 4 108
FirstMargin Of 5 144
LastMargin Of 5 144

Is this value in Pixels? what are the units? and if this is not in pixels
how can i convert them to pixels
 
S

Shyam Pillai

Abhishek,
The values are in Points.

1 Point = 20 Twips

You can conver the twips to pixel value. Run a search on Google groups for
twips to pixel conversion and you'll get the API's.


--
Regards,
Shyam Pillai

Image Importer Wizard: http://skp.mvps.org/iiw.htm
 
S

Steve Rindsberg

During my testing the FirstMargin and LeftMargin give me this result

FirstMargin Of 1 0
LastMargin Of 1 13.5
FirstMargin Of 2 36
LastMargin Of 2 49.5
FirstMargin Of 3 72
LastMargin Of 3 72
FirstMargin Of 4 108
LastMargin Of 4 108
FirstMargin Of 5 144
LastMargin Of 5 144

Is this value in Pixels? what are the units? and if this is not in pixels
how can i convert them to pixels

PowerPoint's units are always Points, 72 Points to the inch.

Pixels is a squirmier concept in PowerPoint. Do you mean in screenshow view or
otherwise? With the PowerPoint window maximized to fill the screen or not?
How big is the current screen in pixels? What version of PowerPoint? (Some
fill the screen, some don't).

Are we having fun yet? ;-)
 
A

Abhishek

Pixels is a squirmier concept in PowerPoint. Do you mean in screenshow view or
otherwise? With the PowerPoint window maximized to fill the screen or not?
How big is the current screen in pixels? What version of PowerPoint? (Some
fill the screen, some don't).

Are we having fun yet? ;-)

I am having a lot of fun :)
Thanks for all the support

Abhishek
 
A

Abhishek

I would like to know if there is a method to extract the numbering in the
format set e.g. alphabets, Roman Numerals. At present what i am getting is
the number equivalent of characters or Roman Numerals

Can I get the characters or the Roman Numerals at the first instance

Abhishek
 
S

Steve Rindsberg

I would like to know if there is a method to extract the numbering in the
format set e.g. alphabets, Roman Numerals. At present what i am getting is
the number equivalent of characters or Roman Numerals

Can I get the characters or the Roman Numerals at the first instance

Here's an example that SETs the bullet/number style:

With ActiveWindow.Selection.ShapeRange.TextFrame.TextRange
With .ParagraphFormat.Bullet
.Style = ppBulletAlphaLCParenBoth
End With
End With

Have a look at BulletFormat in the object browser for more details.
 
A

Abhishek

Hi!Steve

First of all sorry for the delay in this reply.
Actually i was not in the office for the past few days.
You misinterpreted my question.
I know the ppBulletAlphaLCParenBoth and i had studied all the constants
relating too it.
What i wanted to know was is there a way out to extract the number in the
roman format.
e.g there are bullets as follows

(i)
(ii)
(iii)
(iv)
(v)
.....
(x)

Now when i use the bullet.number property it gives me the value as
1,2,3,4,5,6,7,8,910
what want to ask is can we get the original values
(i),(ii),(iii),(iv),(v),....,(x)

Regarsd,
Abhishek
 
S

Steve Rindsberg

Ah, I see what you mean.

I think you might have to write your own routines for converting the normal
bullet number into a match for the displayed number. In other words, convert
the number to roman numerals yourself. Ugh.
 
A

Abhishek

Pretty hard task that, I knew this but thought if i could get some easy way
out, but still thanks a lot for all the cooperation and help

Regards,
Abhishek
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top