Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Heading numbers in the left margin
Hi,
I'm trying to create outline numbered headings, where the number is located in the left margin. I try to accomplish this using a negative value for "NumberPosition" on the ListTemplate. Initially, this works fine, but as soon as I click on the Heading's number, the whole paragraph, including the number, "jumps in" to the right so that the number is located exactly at the margin instead of to the left of it. I define my styles and ListTemplate in VBA, the relevant portion of which reads: With .ListTemplate.ListLevels(1) .NumberPosition = CentimetersToPoints(-1.5) .Alignment = wdListLevelAlignLeft .TrailingCharacter = wdTrailingTab .TabPosition = 0 .TextPosition = CentimetersToPoints(0) €¦ End With After clicking on a heading's number, I can see that Word resets "NumberPosition" to 0. Why? Negative indentation clearly appears to be supported (http://office.microsoft.com/en-us/wo...65281033.aspx). I've tried this in Word 2007 and 2010beta Kindly, Fredrik |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Heading numbers in the left margin
A way to work around it would be to let Word think that where the
numbers are appearing _is_ the left margin, and use an indentation value on all the other paragraph styles to move the visible margins in to where you want them to be. On Dec 10, 4:36*am, Fredrik wrote: Hi, I'm trying to create outline numbered headings, where the number is located in the left margin. I try to accomplish this using a negative value for "NumberPosition" on the ListTemplate. Initially, this works fine, but as soon as I click on the Heading's number, the whole paragraph, including the number, "jumps in" to the right so that the number is located exactly at the margin instead of to the left of it. I define my styles and ListTemplate in VBA, the relevant portion of which reads: With .ListTemplate.ListLevels(1) * * * * * * .NumberPosition = CentimetersToPoints(-1.5) * * * * * * .Alignment = wdListLevelAlignLeft * * * * * * .TrailingCharacter = wdTrailingTab * * * * * * .TabPosition = 0 * * * * * * .TextPosition = CentimetersToPoints(0) * * * * … End With After clicking on a heading's number, I can see that Word resets "NumberPosition" to 0. Why? Negative indentation clearly appears to be supported (http://office.microsoft.com/en-us/wo...65281033.aspx). I've tried this in Word 2007 and 2010beta Kindly, Fredrik |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Heading numbers in the left margin
Negative indents seem unreliable with outline numbering. Choose to leave the
number at the margin but set the "Number alignment" to "Right" instead. -- Stefan Blom Microsoft Word MVP "Fredrik" wrote in message ... Hi, I'm trying to create outline numbered headings, where the number is located in the left margin. I try to accomplish this using a negative value for "NumberPosition" on the ListTemplate. Initially, this works fine, but as soon as I click on the Heading's number, the whole paragraph, including the number, "jumps in" to the right so that the number is located exactly at the margin instead of to the left of it. I define my styles and ListTemplate in VBA, the relevant portion of which reads: With .ListTemplate.ListLevels(1) .NumberPosition = CentimetersToPoints(-1.5) .Alignment = wdListLevelAlignLeft .TrailingCharacter = wdTrailingTab .TabPosition = 0 .TextPosition = CentimetersToPoints(0) . End With After clicking on a heading's number, I can see that Word resets "NumberPosition" to 0. Why? Negative indentation clearly appears to be supported (http://office.microsoft.com/en-us/wo...65281033.aspx). I've tried this in Word 2007 and 2010beta Kindly, Fredrik |
#4
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Heading numbers in the left margin
Thanks for your info,
the way we used to do it is like Peter says, making all styles BUT the headings indented. I'm trying to avoid this though, since it renders all paragraph styles useless in tables, textboxes, etc. It would be cleaner if all styles were aligned at indentation=0 and the numbering could be placed in the left margin. Actually (and oddly enough), the following definition seems to do the trick. Don't know if I dare trust it though... .NumberFormat = "%1" .NumberStyle = wdListNumberStyleArabic .NumberPosition = CentimetersToPoints(0) .Alignment = wdListLevelAlignRight .TrailingCharacter = wdTrailingTab .TabPosition = 0 .TextPosition = CentimetersToPoints(1.5) ' Somehow, this is interpreted as a minus indentation! .LinkedStyle = "Numbered Heading 1" "Peter T. Daniels" wrote: A way to work around it would be to let Word think that where the numbers are appearing _is_ the left margin, and use an indentation value on all the other paragraph styles to move the visible margins in to where you want them to be. On Dec 10, 4:36 am, Fredrik wrote: Hi, I'm trying to create outline numbered headings, where the number is located in the left margin. I try to accomplish this using a negative value for "NumberPosition" on the ListTemplate. Initially, this works fine, but as soon as I click on the Heading's number, the whole paragraph, including the number, "jumps in" to the right so that the number is located exactly at the margin instead of to the left of it. I define my styles and ListTemplate in VBA, the relevant portion of which reads: With .ListTemplate.ListLevels(1) .NumberPosition = CentimetersToPoints(-1.5) .Alignment = wdListLevelAlignLeft .TrailingCharacter = wdTrailingTab .TabPosition = 0 .TextPosition = CentimetersToPoints(0) €¦ End With After clicking on a heading's number, I can see that Word resets "NumberPosition" to 0. Why? Negative indentation clearly appears to be supported (http://office.microsoft.com/en-us/wo...65281033.aspx). I've tried this in Word 2007 and 2010beta Kindly, Fredrik . |
#5
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Heading numbers in the left margin
The trick is that you are aligning numbers to the *right* which is what I
suggested in a previous message. -- Stefan Blom Microsoft Word MVP "Fredrik" wrote in message ... Thanks for your info, the way we used to do it is like Peter says, making all styles BUT the headings indented. I'm trying to avoid this though, since it renders all paragraph styles useless in tables, textboxes, etc. It would be cleaner if all styles were aligned at indentation=0 and the numbering could be placed in the left margin. Actually (and oddly enough), the following definition seems to do the trick. Don't know if I dare trust it though... .NumberFormat = "%1" .NumberStyle = wdListNumberStyleArabic .NumberPosition = CentimetersToPoints(0) .Alignment = wdListLevelAlignRight .TrailingCharacter = wdTrailingTab .TabPosition = 0 .TextPosition = CentimetersToPoints(1.5) ' Somehow, this is interpreted as a minus indentation! .LinkedStyle = "Numbered Heading 1" "Peter T. Daniels" wrote: A way to work around it would be to let Word think that where the numbers are appearing _is_ the left margin, and use an indentation value on all the other paragraph styles to move the visible margins in to where you want them to be. On Dec 10, 4:36 am, Fredrik wrote: Hi, I'm trying to create outline numbered headings, where the number is located in the left margin. I try to accomplish this using a negative value for "NumberPosition" on the ListTemplate. Initially, this works fine, but as soon as I click on the Heading's number, the whole paragraph, including the number, "jumps in" to the right so that the number is located exactly at the margin instead of to the left of it. I define my styles and ListTemplate in VBA, the relevant portion of which reads: With .ListTemplate.ListLevels(1) .NumberPosition = CentimetersToPoints(-1.5) .Alignment = wdListLevelAlignLeft .TrailingCharacter = wdTrailingTab .TabPosition = 0 .TextPosition = CentimetersToPoints(0) . End With After clicking on a heading's number, I can see that Word resets "NumberPosition" to 0. Why? Negative indentation clearly appears to be supported (http://office.microsoft.com/en-us/wo...65281033.aspx). I've tried this in Word 2007 and 2010beta Kindly, Fredrik . |
#6
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Heading numbers in the left margin
No, actually it works even smoother with left aligned numbers. The trick is
that the TextPosition is interpreted as a minus indentation for some reason. But the solution is very unstable. It probably works by exploiting some obscure bug in the numbering engine. "Stefan Blom" wrote: The trick is that you are aligning numbers to the *right* which is what I suggested in a previous message. -- Stefan Blom Microsoft Word MVP "Fredrik" wrote in message ... Thanks for your info, the way we used to do it is like Peter says, making all styles BUT the headings indented. I'm trying to avoid this though, since it renders all paragraph styles useless in tables, textboxes, etc. It would be cleaner if all styles were aligned at indentation=0 and the numbering could be placed in the left margin. Actually (and oddly enough), the following definition seems to do the trick. Don't know if I dare trust it though... .NumberFormat = "%1" .NumberStyle = wdListNumberStyleArabic .NumberPosition = CentimetersToPoints(0) .Alignment = wdListLevelAlignRight .TrailingCharacter = wdTrailingTab .TabPosition = 0 .TextPosition = CentimetersToPoints(1.5) ' Somehow, this is interpreted as a minus indentation! .LinkedStyle = "Numbered Heading 1" "Peter T. Daniels" wrote: A way to work around it would be to let Word think that where the numbers are appearing _is_ the left margin, and use an indentation value on all the other paragraph styles to move the visible margins in to where you want them to be. On Dec 10, 4:36 am, Fredrik wrote: Hi, I'm trying to create outline numbered headings, where the number is located in the left margin. I try to accomplish this using a negative value for "NumberPosition" on the ListTemplate. Initially, this works fine, but as soon as I click on the Heading's number, the whole paragraph, including the number, "jumps in" to the right so that the number is located exactly at the margin instead of to the left of it. I define my styles and ListTemplate in VBA, the relevant portion of which reads: With .ListTemplate.ListLevels(1) .NumberPosition = CentimetersToPoints(-1.5) .Alignment = wdListLevelAlignLeft .TrailingCharacter = wdTrailingTab .TabPosition = 0 .TextPosition = CentimetersToPoints(0) . End With After clicking on a heading's number, I can see that Word resets "NumberPosition" to 0. Why? Negative indentation clearly appears to be supported (http://office.microsoft.com/en-us/wo...65281033.aspx). I've tried this in Word 2007 and 2010beta Kindly, Fredrik . . |
#7
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Heading numbers in the left margin
No, actually it works even smoother with left aligned numbers. The trick is
that the TextPosition is interpreted as a minus indentation for some reason. But the solution is very unstable. It probably works by exploiting some obscure bug in the numbering engine. "Stefan Blom" wrote: The trick is that you are aligning numbers to the *right* which is what I suggested in a previous message. -- Stefan Blom Microsoft Word MVP "Fredrik" wrote in message ... Thanks for your info, the way we used to do it is like Peter says, making all styles BUT the headings indented. I'm trying to avoid this though, since it renders all paragraph styles useless in tables, textboxes, etc. It would be cleaner if all styles were aligned at indentation=0 and the numbering could be placed in the left margin. Actually (and oddly enough), the following definition seems to do the trick. Don't know if I dare trust it though... .NumberFormat = "%1" .NumberStyle = wdListNumberStyleArabic .NumberPosition = CentimetersToPoints(0) .Alignment = wdListLevelAlignRight .TrailingCharacter = wdTrailingTab .TabPosition = 0 .TextPosition = CentimetersToPoints(1.5) ' Somehow, this is interpreted as a minus indentation! .LinkedStyle = "Numbered Heading 1" "Peter T. Daniels" wrote: A way to work around it would be to let Word think that where the numbers are appearing _is_ the left margin, and use an indentation value on all the other paragraph styles to move the visible margins in to where you want them to be. On Dec 10, 4:36 am, Fredrik wrote: Hi, I'm trying to create outline numbered headings, where the number is located in the left margin. I try to accomplish this using a negative value for "NumberPosition" on the ListTemplate. Initially, this works fine, but as soon as I click on the Heading's number, the whole paragraph, including the number, "jumps in" to the right so that the number is located exactly at the margin instead of to the left of it. I define my styles and ListTemplate in VBA, the relevant portion of which reads: With .ListTemplate.ListLevels(1) .NumberPosition = CentimetersToPoints(-1.5) .Alignment = wdListLevelAlignLeft .TrailingCharacter = wdTrailingTab .TabPosition = 0 .TextPosition = CentimetersToPoints(0) . End With After clicking on a heading's number, I can see that Word resets "NumberPosition" to 0. Why? Negative indentation clearly appears to be supported (http://office.microsoft.com/en-us/wo...65281033.aspx). I've tried this in Word 2007 and 2010beta Kindly, Fredrik . . |
#8
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Heading numbers in the left margin
I see your point, but since you call the solution "unstable," using
right-aligned numbers would seem safer. -- Stefan Blom Microsoft Word MVP "Fredrik" wrote in message ... No, actually it works even smoother with left aligned numbers. The trick is that the TextPosition is interpreted as a minus indentation for some reason. But the solution is very unstable. It probably works by exploiting some obscure bug in the numbering engine. "Stefan Blom" wrote: The trick is that you are aligning numbers to the *right* which is what I suggested in a previous message. -- Stefan Blom Microsoft Word MVP "Fredrik" wrote in message ... Thanks for your info, the way we used to do it is like Peter says, making all styles BUT the headings indented. I'm trying to avoid this though, since it renders all paragraph styles useless in tables, textboxes, etc. It would be cleaner if all styles were aligned at indentation=0 and the numbering could be placed in the left margin. Actually (and oddly enough), the following definition seems to do the trick. Don't know if I dare trust it though... .NumberFormat = "%1" .NumberStyle = wdListNumberStyleArabic .NumberPosition = CentimetersToPoints(0) .Alignment = wdListLevelAlignRight .TrailingCharacter = wdTrailingTab .TabPosition = 0 .TextPosition = CentimetersToPoints(1.5) ' Somehow, this is interpreted as a minus indentation! .LinkedStyle = "Numbered Heading 1" "Peter T. Daniels" wrote: A way to work around it would be to let Word think that where the numbers are appearing _is_ the left margin, and use an indentation value on all the other paragraph styles to move the visible margins in to where you want them to be. On Dec 10, 4:36 am, Fredrik wrote: Hi, I'm trying to create outline numbered headings, where the number is located in the left margin. I try to accomplish this using a negative value for "NumberPosition" on the ListTemplate. Initially, this works fine, but as soon as I click on the Heading's number, the whole paragraph, including the number, "jumps in" to the right so that the number is located exactly at the margin instead of to the left of it. I define my styles and ListTemplate in VBA, the relevant portion of which reads: With .ListTemplate.ListLevels(1) .NumberPosition = CentimetersToPoints(-1.5) .Alignment = wdListLevelAlignLeft .TrailingCharacter = wdTrailingTab .TabPosition = 0 .TextPosition = CentimetersToPoints(0) . End With After clicking on a heading's number, I can see that Word resets "NumberPosition" to 0. Why? Negative indentation clearly appears to be supported (http://office.microsoft.com/en-us/wo...65281033.aspx). I've tried this in Word 2007 and 2010beta Kindly, Fredrik . . |
#9
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Heading numbers in the left margin
I see your point, but since you call the solution "unstable," using
right-aligned numbers would seem safer. -- Stefan Blom Microsoft Word MVP "Fredrik" wrote in message ... No, actually it works even smoother with left aligned numbers. The trick is that the TextPosition is interpreted as a minus indentation for some reason. But the solution is very unstable. It probably works by exploiting some obscure bug in the numbering engine. "Stefan Blom" wrote: The trick is that you are aligning numbers to the *right* which is what I suggested in a previous message. -- Stefan Blom Microsoft Word MVP "Fredrik" wrote in message ... Thanks for your info, the way we used to do it is like Peter says, making all styles BUT the headings indented. I'm trying to avoid this though, since it renders all paragraph styles useless in tables, textboxes, etc. It would be cleaner if all styles were aligned at indentation=0 and the numbering could be placed in the left margin. Actually (and oddly enough), the following definition seems to do the trick. Don't know if I dare trust it though... .NumberFormat = "%1" .NumberStyle = wdListNumberStyleArabic .NumberPosition = CentimetersToPoints(0) .Alignment = wdListLevelAlignRight .TrailingCharacter = wdTrailingTab .TabPosition = 0 .TextPosition = CentimetersToPoints(1.5) ' Somehow, this is interpreted as a minus indentation! .LinkedStyle = "Numbered Heading 1" "Peter T. Daniels" wrote: A way to work around it would be to let Word think that where the numbers are appearing _is_ the left margin, and use an indentation value on all the other paragraph styles to move the visible margins in to where you want them to be. On Dec 10, 4:36 am, Fredrik wrote: Hi, I'm trying to create outline numbered headings, where the number is located in the left margin. I try to accomplish this using a negative value for "NumberPosition" on the ListTemplate. Initially, this works fine, but as soon as I click on the Heading's number, the whole paragraph, including the number, "jumps in" to the right so that the number is located exactly at the margin instead of to the left of it. I define my styles and ListTemplate in VBA, the relevant portion of which reads: With .ListTemplate.ListLevels(1) .NumberPosition = CentimetersToPoints(-1.5) .Alignment = wdListLevelAlignLeft .TrailingCharacter = wdTrailingTab .TabPosition = 0 .TextPosition = CentimetersToPoints(0) . End With After clicking on a heading's number, I can see that Word resets "NumberPosition" to 0. Why? Negative indentation clearly appears to be supported (http://office.microsoft.com/en-us/wo...65281033.aspx). I've tried this in Word 2007 and 2010beta Kindly, Fredrik . . |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
numbers in the left margin | Microsoft Word Help | |||
How do I set numbers in left margin? | Microsoft Word Help | |||
How do I insert a symbol to left of left margin so text lines up? | Microsoft Word Help | |||
How to modify a left margin showing a logo in the margin on every | Microsoft Word Help | |||
left margin numbers (for a contract) | Microsoft Word Help |