same indentation for bulletpoint and bulletnumber

A

Associates

Hi,

I wonder if anyone might be able to help me with bullet point and bullet
number in word 03.

I have two macros, insertBulletPoint and insertBulletNumber that help
insert bullet point and bullet number to the document respectively. However,
the problem i have here is that say, i inserted bullet points first as
follows (pretend that the circle i am using here represents a solid dot/circle
o Grocery shopping
o Clothing
o Christmas shopping

Then, i inserted bullet number (1,2,3,...) after the bullet points. The
result was it was indented further in as follows
1. Project A
2. Project B

My question is how to make them lined up the same (or the same indentation)
regardless whichever goes first.

I got the code for insertbulletnumber macro here that is from the macro
recording result
With ListGalleries(wdBulletGallery).ListTemplates(1).ListLevels(1)
.NumberFormat = ChrW(61623)
.TrailingCharacter = wdTrailingTab
.NumberStyle = wdListNumberStyleBullet
.NumberPosition = CentimetersToPoints(0.63)
.Alignment = wdListLevelAlignLeft
.TextPosition = CentimetersToPoints(1.27)
.TabPosition = CentimetersToPoints(1.27)
.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 = "Symbol"
End With
.LinkedStyle = ""
End With
ListGalleries(wdBulletGallery).ListTemplates(1).Name = ""
Selection.Range.ListFormat.ApplyListTemplate
ListTemplate:=ListGalleries( _
wdBulletGallery).ListTemplates(1), ContinuePreviousList:=False,
ApplyTo:= _
wdListApplyToWholeList, DefaultListBehavior:=wdWord10ListBehavior

Thank you for your help in advance
 
S

Stefan Blom

Make sure that both macros use the same values for NumberPosition,
TextPosition, and TabPosition.

Note, however, that it would be easier to apply the formatting with styles.
Use a style from the List Number (for number formatting) and one from the
List Bullet series (for bullet formatting). If you want to, you can modify
these styles to suit your needs.
 
A

Associates

Thank you Stefan for your reply.

I have checked both macros for NumberPosition, TextPosition, and TabPosition
and They are the same in value.

I have also checked the bullet position and Text position in the customised
bulleted list under the bullet and numbering dialog box and compared it to
the number position and again they are the same.

With respect to the other option you were talking about, is it the List
styles under Bullets and Numbering? Could you please elaborate this a bit for
me?

Thank you in advance
 
S

Stefan Blom

Assuming that you are referring to single-level numbering, you could use the
built-in paragraph styles that have been defined with numbering and bullet
formatting, respectively. To find these styles, hold Shift as you click the
arrow next to the Style box (Formatting toolbar).
 
A

Associates

Stefan,

Yes, i went to modify "List Number" from the Style and formatting list. I
think this is level 1 or single-level as i can see there are "List Number 2",
"List Number 3" and so on on the list. However, after changing the number
indentation, Text tab spaces for the "List Number", i went to test it out.

When i inserted the number points to the document as follows
1. testing 1
2. testing 2
|
|

Then, i pressed "Enter" twice to get out of the points because i wanna
insert another paragraphs. What i found bizarre was the cursor point was
actually indented as labelled as "|"

Then, i had to press "backspace" key twice to bring the cursor back to its
original position as follows
1. testing 1
2. testing 2
|

Next, i entered some texts and inserted another Number points to it as follows
1. testing 1
2. testing 2

Testing Testing Testing
3. testing 1 again

What happen was it did not re-start the numbering but instead, it continued
the numbering from the previous as shown above. It should be
1. testing 1 again

rather than "3. testing 1 again". I don't know where it went wrong.

Any helps would be greatly appreciated.

Thank you in advance
 
S

Stefan Blom

To "turn off" numbering you should apply a different paragraph style. For
example, you can press Ctrl+Shift+N to apply the Normal style to a
paragraph.

With style-based numbering, the default is not to restart it. For ways to
force restarts, see the article at
http://word.mvps.org/faqs/numbering/listrestartmethods.htm (the easiest way
is making use of an outline-numbered list).
 
A

Associates

Hi Stefan,

I used RestartListNumbering sub from the link you provided and it worked
great. It forces re-start. So that solved the re-start issue.

However, i don't know how to move the cursor back to its original position.
I realised that you advised to use ctrl + shift + N to change the paragraph
style to Normal. But is there any way of getting the word to do that for me?
because normally when user want to finish with the list number, he or she
just needs to press "Enter" key twice and word automatically moves the cursor
back to the position where it should be. I could use ctrl+shift+N key to
apply the Normal style to paragraph but am trying to make it as easy as
possible for normal users to use it.

Really appreciates your help and time.

Thank you in advance
 
S

Stefan Blom

As far as I know, there is no easy way to affect the behavior of the Enter
key. However, to make it easier for users, you can add a toolbar button (to
a toolbar) that applies (say) Normal style to text, and teach the users to
make use of that button.
 
A

Associates

Thank you Stefan for your reply.

I still prefer to use macro to do this, Stefan. But i'll jot down your
advise anyway for future reference.

Many thanks
 
S

Stefan Blom

Associates said:
Thank you Stefan for your reply.

I still prefer to use macro to do this, Stefan. But i'll jot down your
advise anyway for future reference.

If you haven't already, then you may want to try asking in a programming
newsgroup such as microsoft.public.word.vba.general.

--
Stefan Blom
Microsoft Word MVP
 
A

Associates

Yep, I have posted it in the programming newsgroup but so far no replies from
anyone. I will try to ask it in a VBA newsgroup.

Many thanks
 

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