![]() |
|
|
|
#1
|
|||
|
|||
|
after a copy and paste, I need to tidy up some formattingso I run this..Sub tidyBullets(oRange As Range) Dim oPara As Paragraph oRange.Select For Each oPara In Selection.Paragraphs If oPara.Range.ListFormat.ListType = WdListType.wdListBullet Then With oPara.Range.ParagraphFormat .LeftIndent = CentimetersToPoints(1.6) .FirstLineIndent = CentimetersToPoints(-0.8) .TabStops.ClearAll End With ElseIf oPara.Range.ListFormat.ListType = WdListType.wdListNoNumbering Then With oPara.Range.ParagraphFormat .LeftIndent = CentimetersToPoints(1.6) .FirstLineIndent = CentimetersToPoints(-0.8) .TabStops.ClearAll End With Else With oPara.Range.ParagraphFormat .LeftIndent = CentimetersToPoints(0.8) .RightIndent = CentimetersToPoints(0) .FirstLineIndent = CentimetersToPoints(-0.8) .TabStops.ClearAll .TabStops.Add 1.6, wdLeft End With End If Next End SubI can watching it stepping through the code quite happily and throw no errors, however there is no change to the formatting of the paragraphs. The document is not protected at this point
|
|
#2
|
|||
|
|||
|
OK, how do I get the code to have line breaks in it on this forum?
|
|
#3
|
|||
|
|||
|
Sub tidyBullets(oRange As Range)
Dim oPara As Paragraph oRange.Select For Each oPara In Selection.Paragraphs If oPara.Range.ListFormat.ListType = WdListType.wdListBullet Then With oPara.Range.ParagraphFormat .LeftIndent = CentimetersToPoints(1.6) .FirstLineIndent = CentimetersToPoints(-0.8) .TabStops.ClearAll End With ElseIf oPara.Range.ListFormat.ListType = WdListType.wdListNoNumbering Then With oPara.Range.ParagraphFormat .LeftIndent = CentimetersToPoints(1.6) .FirstLineIndent = CentimetersToPoints(-0.8) .TabStops.ClearAll End With Else With oPara.Range.ParagraphFormat .LeftIndent = CentimetersToPoints(0.8) .RightIndent = CentimetersToPoints(0) .FirstLineIndent = CentimetersToPoints(-0.8) .TabStops.ClearAll .TabStops.Add 1.6, wdLeft End With End If Next End Sub |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
How to globally change the formatting of a bullet style to another style?
|
ravl13 | Word | 5 | 03-10-2013 05:04 PM |
Formatting by Bullet Level
|
Caron84 | Word | 2 | 01-17-2013 10:27 AM |
| Defining New Bullet - Custom Bullet | dsberger | PowerPoint | 0 | 11-28-2012 10:20 AM |
| Custom formatting code - rounding problem | venkys4u | Excel | 1 | 08-14-2012 07:45 PM |
Formatting bullet list
|
Daved2424 | Word | 4 | 11-22-2010 10:36 AM |